Explorar el Código

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

Eason Lin hace 8 años
padre
commit
848fa41ca0
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  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 {