diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-12-02 13:23:25 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-12-03 13:12:58 +0100 |
commit | d90e37e0c6e812f9913bf256c9c81aa05b7a08aa (patch) | |
tree | 7b1b14464eefec1188ca2eed53c64e4823453cc9 /common/loggers | |
parent | 32471b57bde51c55a15dbf1db75d6e5f7232c347 (diff) |
all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
Diffstat (limited to 'common/loggers')
-rw-r--r-- | common/loggers/ignorableLogger.go | 1 | ||||
-rw-r--r-- | common/loggers/loggers.go | 9 | ||||
-rw-r--r-- | common/loggers/loggers_test.go | 1 |
3 files changed, 2 insertions, 9 deletions
diff --git a/common/loggers/ignorableLogger.go b/common/loggers/ignorableLogger.go index 1bd4d99b8..766aae07c 100644 --- a/common/loggers/ignorableLogger.go +++ b/common/loggers/ignorableLogger.go @@ -34,7 +34,6 @@ func NewIgnorableLogger(logger Logger, statements ...string) IgnorableLogger { statementsSet := make(map[string]bool) for _, s := range statements { statementsSet[strings.ToLower(s)] = true - } return ignorableLogger{ Logger: logger, diff --git a/common/loggers/loggers.go b/common/loggers/loggers.go index 5c04b9eab..c9b5d21be 100644 --- a/common/loggers/loggers.go +++ b/common/loggers/loggers.go @@ -29,10 +29,8 @@ import ( jww "github.com/spf13/jwalterweatherman" ) -var ( - // Counts ERROR logs to the global jww logger. - GlobalErrorCounter *jww.Counter -) +// Counts ERROR logs to the global jww logger. +var GlobalErrorCounter *jww.Counter func init() { GlobalErrorCounter = &jww.Counter{} @@ -253,7 +251,6 @@ func (a labelColorizer) Write(p []byte) (n int, err error) { // bytes, so we lie a little. _, err = a.w.Write([]byte(replaced)) return len(p), err - } // InitGlobalLogger initializes the global logger, used in some rare cases. @@ -264,7 +261,6 @@ func InitGlobalLogger(stdoutThreshold, logThreshold jww.Threshold, outHandle, lo jww.SetLogOutput(logHandle) jww.SetLogThreshold(logThreshold) jww.SetStdoutThreshold(stdoutThreshold) - } func getLogWriters(outHandle, logHandle io.Writer) (io.Writer, io.Writer) { @@ -279,7 +275,6 @@ func getLogWriters(outHandle, logHandle io.Writer) (io.Writer, io.Writer) { } return outHandle, logHandle - } type fatalLogWriter int diff --git a/common/loggers/loggers_test.go b/common/loggers/loggers_test.go index 7af3ca9da..0c0cc859b 100644 --- a/common/loggers/loggers_test.go +++ b/common/loggers/loggers_test.go @@ -31,7 +31,6 @@ func TestLogger(t *testing.T) { l.Warnln("A warning") c.Assert(l.LogCounters().ErrorCounter.Count(), qt.Equals, uint64(2)) - } func TestLoggerToWriterWithPrefix(t *testing.T) { |