From 5ccc34aa08447e4378808ca5de7fe25455bfec9b Mon Sep 17 00:00:00 2001 From: FengbinShi Date: Sat, 29 Oct 2022 23:37:19 +0800 Subject: [PATCH] fix lint --- health/checker.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/health/checker.go b/health/checker.go index ef34c692e..ab03d3fa9 100644 --- a/health/checker.go +++ b/health/checker.go @@ -55,7 +55,9 @@ func (c *checkerHandler) getName() string { func (c *checkerHandler) check(ctx context.Context) bool { defer func() { - recover() + if err := recover(); err != nil { + + } }() var cancel func() @@ -78,10 +80,8 @@ func (c *checkerHandler) check(ctx context.Context) bool { Detail: detail, Err: err, } - if c.CheckerStatus == old { - return false - } - return true + + return c.CheckerStatus != old } func (c *checkerHandler) run(ctx context.Context) {