From 49082656b79cea1d5ea21fe92564eaddd9b5843a Mon Sep 17 00:00:00 2001 From: Keuin Date: Fri, 14 Jul 2023 22:29:35 +0800 Subject: Refactor: use proper const name. --- logging/logger.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'logging') diff --git a/logging/logger.go b/logging/logger.go index 9724c2f..f5de019 100644 --- a/logging/logger.go +++ b/logging/logger.go @@ -21,21 +21,21 @@ type Logger struct { } const ( - kDebug = "DEBUG" - kInfo = "INFO" - kWarning = "WARNING" - kError = "ERROR" - kFatal = "FATAL" + levelDebug = "DEBUG" + levelInfo = "INFO" + levelWarning = "WARNING" + levelError = "ERROR" + levelFatal = "FATAL" ) func NewWrappedLogger(delegate *log.Logger, name string) Logger { return Logger{ delegate: delegate, - debugHeader: fmt.Sprintf("[%v][%v]", name, kDebug), - infoHeader: fmt.Sprintf("[%v][%v]", name, kInfo), - warningHeader: fmt.Sprintf("[%v][%v]", name, kWarning), - errorHeader: fmt.Sprintf("[%v][%v]", name, kError), - fatalHeader: fmt.Sprintf("[%v][%v]", name, kFatal), + debugHeader: fmt.Sprintf("[%v][%v]", name, levelDebug), + infoHeader: fmt.Sprintf("[%v][%v]", name, levelInfo), + warningHeader: fmt.Sprintf("[%v][%v]", name, levelWarning), + errorHeader: fmt.Sprintf("[%v][%v]", name, levelError), + fatalHeader: fmt.Sprintf("[%v][%v]", name, levelFatal), } } -- cgit v1.2.3