Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix linter issues #57

Merged
merged 3 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading