1
0
Fork 0

fix: update linter.

This commit is contained in:
Ludovic Fernandez 2019-09-26 11:00:06 +02:00 committed by Traefiker Bot
parent 027d313df5
commit 29efac3e5e
52 changed files with 17 additions and 89 deletions

View file

@ -45,7 +45,6 @@ func AddServiceFields(rw http.ResponseWriter, req *http.Request, next http.Handl
data.Core[ServiceAddr] = req.URL.Host
next.ServeHTTP(rw, req)
}
// AddOriginFields add origin fields

View file

@ -69,8 +69,8 @@ func toLog(fields logrus.Fields, key string, defaultValue string, quoted bool) i
return v
}
}
return defaultValue
return defaultValue
}
func toLogEntry(s string, defaultValue string, quote bool) string {

View file

@ -99,11 +99,9 @@ func TestCommonLogFormatter_Format(t *testing.T) {
assert.Equal(t, test.expectedLog, string(raw))
})
}
}
func Test_toLog(t *testing.T) {
testCases := []struct {
desc string
fields logrus.Fields

View file

@ -527,7 +527,6 @@ func TestNewLogHandlerOutputStdout(t *testing.T) {
for _, test := range testCases {
test := test
t.Run(test.desc, func(t *testing.T) {
// NOTE: It is not possible to run these cases in parallel because we capture Stdout
file, restoreStdout := captureStdout(t)
@ -543,7 +542,6 @@ func TestNewLogHandlerOutputStdout(t *testing.T) {
}
func assertValidLogData(t *testing.T, expected string, logData []byte) {
if len(expected) == 0 {
assert.Zero(t, len(logData))
t.Log(string(logData))