1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-06-24 10:23:43 +02:00

Fix code formatting

This commit is contained in:
Henrik Hautakoski 2022-11-23 15:52:19 +01:00
parent b0e5b455ca
commit adb1ad3c6d
No known key found for this signature in database
GPG key ID: 608414D93E862CCD
21 changed files with 884 additions and 950 deletions

View file

@ -1,29 +1,29 @@
package utils
import (
"reflect"
"testing"
"reflect"
"testing"
log "github.com/inconshreveable/log15"
log "github.com/inconshreveable/log15"
)
func Test_ParseLogFormatter(t *testing.T) {
tests := []struct {
name string
arg string
want log.Format
}{
{ "Default", "", log.TerminalFormat() },
{ "LogFmt", "logfmt", log.LogfmtFormat() },
{ "Json", "json", log.JsonFormat() },
{ "JsonPretty", "json-pretty", log.JsonFormat() },
{ "Unknown", "unknown", log.TerminalFormat() },
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := ParseLogFormatter(tt.arg); reflect.ValueOf(got).Pointer() != reflect.ValueOf(tt.want).Pointer() {
t.Errorf("parseLogFormatter() = %v, want %v", got, tt.want)
}
})
}
tests := []struct {
name string
arg string
want log.Format
}{
{"Default", "", log.TerminalFormat()},
{"LogFmt", "logfmt", log.LogfmtFormat()},
{"Json", "json", log.JsonFormat()},
{"JsonPretty", "json-pretty", log.JsonFormat()},
{"Unknown", "unknown", log.TerminalFormat()},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := ParseLogFormatter(tt.arg); reflect.ValueOf(got).Pointer() != reflect.ValueOf(tt.want).Pointer() {
t.Errorf("parseLogFormatter() = %v, want %v", got, tt.want)
}
})
}
}