diff --git a/http_logging_test.go b/http_logging_test.go index 7bec558..750d5e1 100644 --- a/http_logging_test.go +++ b/http_logging_test.go @@ -6,7 +6,7 @@ import ( "crypto/tls" "crypto/x509" "crypto/x509/pkix" - "fmt" + "errors" "log" "net/http" "net/url" @@ -64,7 +64,7 @@ func (n *NullHTTPWriter) Write(b []byte) (int, error) { panic("some fake http write panic") } if n.doErr { - return 0, fmt.Errorf("some fake http write error") + return 0, errors.New("some fake http write error") } return len(b), nil } diff --git a/logger_test.go b/logger_test.go index f1ac354..d212960 100644 --- a/logger_test.go +++ b/logger_test.go @@ -620,7 +620,7 @@ func TestLoggerFatalCliMode(t *testing.T) { func TestLoggerFatalExitOverride(t *testing.T) { SetDefaultsForClientTools() exitCalled := false - Config.FatalExit = func(code int) { + Config.FatalExit = func(_ int) { exitCalled = true } Fatalf("testing log.Fatalf exit case") @@ -769,7 +769,7 @@ func TestSerializationOfError(t *testing.T) { if kvStr != expected { t.Errorf("unexpected:\n%s\nvs:\n%s\n", kvStr, expected) } - err = fmt.Errorf("test error") + err = errors.New("test error") Errf("Error on purpose: %v", err) S(Error, "Error on purpose", Any("err", err)) kv = Any("err", err)