mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-23 09:00:20 +08:00
fix golint issues in core/rescue (#508)
This commit is contained in:
parent
497762ab47
commit
90562df826
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user