Skip to content

Commit

Permalink
fix linter issues (#57)
Browse files Browse the repository at this point in the history
* fix linter issues

* use go 1.21.*
  • Loading branch information
ldemailly authored Mar 6, 2024
1 parent 4b8d4de commit 8ed34bf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gochecks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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@v4
4 changes: 2 additions & 2 deletions http_logging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"fmt"
"errors"
"log"
"net/http"
"net/url"
Expand Down Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 8ed34bf

Please sign in to comment.