Browse Source

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

Eason Lin 8 years ago
parent
commit
848fa41ca0
1 changed files with 1 additions and 0 deletions
  1. 1 0
      recovery.go

+ 1 - 0
recovery.go

@@ -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 {