doc(recovery): add RecoveryWithWriter doc

This commit is contained in:
Eason Lin 2017-09-04 23:14:06 +08:00
parent cdf26f994b
commit c0a6f686bf

View File

@ -26,6 +26,7 @@ func Recovery() HandlerFunc {
return RecoveryWithWriter(DefaultErrorWriter)
}
// RecoveryWithWriter returns a middleware for a given writer that recovers from any panics and writes a 500 if there was one.
func RecoveryWithWriter(out io.Writer) HandlerFunc {
var logger *log.Logger
if out != nil {