From 90562df82672e619a808906b8ad844a444149565 Mon Sep 17 00:00:00 2001 From: Kevin Wan Date: Mon, 22 Feb 2021 16:47:02 +0800 Subject: [PATCH] fix golint issues in core/rescue (#508) --- core/rescue/recover.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/rescue/recover.go b/core/rescue/recover.go index 52148218..34b9feb5 100644 --- a/core/rescue/recover.go +++ b/core/rescue/recover.go @@ -2,6 +2,9 @@ package rescue import "github.com/tal-tech/go-zero/core/logx" +// Recover is used with defer to do cleanup on panics. +// Use it like: +// defer Recover(func() {}) func Recover(cleanups ...func()) { for _, cleanup := range cleanups { cleanup()