From c549728c95323ea17ff3e0968283fa1f003afd98 Mon Sep 17 00:00:00 2001 From: Laurent Demailly Date: Wed, 6 Mar 2024 14:24:15 +0100 Subject: [PATCH 1/2] fix linter issues --- http_logging_test.go | 4 ++-- logger_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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) From aa41b8f5d2ad93df33553a9c2478d49f99c3fdf6 Mon Sep 17 00:00:00 2001 From: Laurent Demailly Date: Wed, 6 Mar 2024 14:28:59 +0100 Subject: [PATCH 2/2] use go 1.21.* --- .github/workflows/gochecks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gochecks.yml b/.github/workflows/gochecks.yml index 01a8d82..5f4f345 100644 --- a/.github/workflows/gochecks.yml +++ b/.github/workflows/gochecks.yml @@ -16,7 +16,7 @@ jobs: - name: Setup Go environment uses: actions/setup-go@v5 with: - go-version: '1.20' + go-version: '1.21' check-latest: true - name: Run golangci-lint uses: golangci/golangci-lint-action@v3