From e328a4e3f43df37e6139f62da7c0e857072ce84c Mon Sep 17 00:00:00 2001 From: David Bariod Date: Sun, 8 Nov 2020 07:07:05 +0100 Subject: [PATCH] fix linter errors --- entry.go | 6 ++---- text_formatter.go | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/entry.go b/entry.go index 5a5cbfe..2e87f5f 100644 --- a/entry.go +++ b/entry.go @@ -123,11 +123,9 @@ func (entry *Entry) WithFields(fields Fields) *Entry { for k, v := range fields { isErrField := false if t := reflect.TypeOf(v); t != nil { - switch t.Kind() { - case reflect.Func: + switch { + case t.Kind() == reflect.Func, t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Func: isErrField = true - case reflect.Ptr: - isErrField = t.Elem().Kind() == reflect.Func } } if isErrField { diff --git a/text_formatter.go b/text_formatter.go index 3c28b54..8fc698a 100644 --- a/text_formatter.go +++ b/text_formatter.go @@ -235,6 +235,8 @@ func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []strin levelColor = yellow case ErrorLevel, FatalLevel, PanicLevel: levelColor = red + case InfoLevel: + levelColor = blue default: levelColor = blue }