mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 20:38:08 +08:00
Fix problems signaled by new linter version v1.45.2
PR (linter: upgrade linter version #405) triggered lint job which failed with many errors generated by various linters. Configurations were added to golangcilint.yaml and several refactorings were made in order to improve the results of the linter. maintidx linter disabled Signed-off-by: Alex Stan <alexandrustan96@yahoo.ro>
This commit is contained in:
committed by
Ramkumar Chinchani
parent
d19a4bf2a1
commit
d325c8b5f4
+2
-2
@@ -21,7 +21,7 @@ func (l Logger) Println(v ...interface{}) {
|
||||
l.Logger.Error().Msg("panic recovered")
|
||||
}
|
||||
|
||||
func NewLogger(level string, output string) Logger {
|
||||
func NewLogger(level, output string) Logger {
|
||||
zerolog.TimeFieldFormat = time.RFC3339Nano
|
||||
|
||||
lvl, err := zerolog.ParseLevel(level)
|
||||
@@ -46,7 +46,7 @@ func NewLogger(level string, output string) Logger {
|
||||
return Logger{Logger: log.Hook(goroutineHook{}).With().Caller().Timestamp().Logger()}
|
||||
}
|
||||
|
||||
func NewAuditLogger(level string, audit string) *Logger {
|
||||
func NewAuditLogger(level, audit string) *Logger {
|
||||
zerolog.TimeFieldFormat = time.RFC3339Nano
|
||||
|
||||
lvl, err := zerolog.ParseLevel(level)
|
||||
|
||||
Reference in New Issue
Block a user