doc(recovery): add RecoveryWithWriter doc (#1097)

This commit is contained in:
Eason Lin 2017-09-05 09:17:53 +08:00 committed by Bo-Yi Wu
parent cdf26f994b
commit 848fa41ca0
1 changed files with 1 additions and 0 deletions

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 {