From 0cdda9ef0b1961e2fb2cecf976f06c84cdf6e132 Mon Sep 17 00:00:00 2001 From: Andrei Smirnov Date: Thu, 10 Mar 2022 18:01:14 +0300 Subject: [PATCH] Removed uneccessary nil check --- cmd/monitoring/main.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cmd/monitoring/main.go b/cmd/monitoring/main.go index 764811ac6..362e57244 100644 --- a/cmd/monitoring/main.go +++ b/cmd/monitoring/main.go @@ -15,10 +15,8 @@ import ( func main() { coreLog, closeLggr := logger.NewLogger() defer func() { - if closeLggr != nil { - if err := closeLggr(); err != nil { - log.Println(fmt.Sprintf("Error while closing Logger: %v", err)) - } + if err := closeLggr(); err != nil { + log.Println(fmt.Sprintf("Error while closing Logger: %v", err)) } }() l := logWrapper{coreLog}