From 47190b0bbf199e0f0a7025d1c20ba31c9f427d18 Mon Sep 17 00:00:00 2001 From: letsfire <249008728@qq.com> Date: Sun, 13 Oct 2019 16:30:15 +0800 Subject: [PATCH] Add Comment Block --- recovery.go | 1 + 1 file changed, 1 insertion(+) diff --git a/recovery.go b/recovery.go index 3d4e588d..0ec76d27 100644 --- a/recovery.go +++ b/recovery.go @@ -44,6 +44,7 @@ func RecoveryWithWriter(out io.Writer) HandlerFunc { }) } +// RecoveryWithWriterAndCallback returns a middleware for a given writer that recovers from any panics and call the custom function if there was one. func RecoveryWithWriterAndCallback(out io.Writer, fn func(c *Context, err interface{}, brokenPipe bool)) HandlerFunc { var logger *log.Logger if out != nil {