run golangci-lint and apply suggested fixes
This commit is contained in:
@@ -67,7 +67,7 @@ func (l Level) Short() string {
|
||||
case Error:
|
||||
return "ERRO"
|
||||
default:
|
||||
return fmt.Sprintf("%s", l)
|
||||
return l.String()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ func (l Level) String() string {
|
||||
case Error:
|
||||
return "error"
|
||||
default:
|
||||
return fmt.Sprintf("%s", string(l))
|
||||
return string(l)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -66,7 +66,8 @@ func (l *loggerImpl) logInternalError(outlet Outlet, err string) {
|
||||
time.Now(),
|
||||
fields,
|
||||
}
|
||||
l.outlets.GetLoggerErrorOutlet().WriteEntry(entry)
|
||||
// ignore errors at this point (still better than panicking if the error is temporary)
|
||||
_ = l.outlets.GetLoggerErrorOutlet().WriteEntry(entry)
|
||||
}
|
||||
|
||||
func (l *loggerImpl) log(level Level, msg string) {
|
||||
|
||||
@@ -5,10 +5,6 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
type stderrLogger struct {
|
||||
Logger
|
||||
}
|
||||
|
||||
type stderrLoggerOutlet struct{}
|
||||
|
||||
func (stderrLoggerOutlet) WriteEntry(entry Entry) error {
|
||||
|
||||
Reference in New Issue
Block a user