diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 550de13..2e55df8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest env: GO_VERSION: stable - GOLANGCI_LINT_VERSION: v1.58.0 + GOLANGCI_LINT_VERSION: v1.63.4 CGO_ENABLED: 0 steps: diff --git a/.golangci.yml b/.golangci.yml index 8958a23..f49e476 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -52,30 +52,18 @@ linters-settings: linters: enable-all: true disable: - - deadcode # deprecated - - exhaustivestruct # deprecated - - golint # deprecated - - ifshort # deprecated - - interfacer # deprecated - - maligned # deprecated - - nosnakecase # deprecated - - scopelint # deprecated - - scopelint # deprecated - - structcheck # deprecated - - varcheck # deprecated - - execinquery # not relevant (SQL) - rowserrcheck # not relevant (SQL) - sqlclosecheck # not relevant (SQL) - cyclop # duplicate of gocyclo - dupl - exhaustive - exhaustruct + - exportloopref - forbidigo - gochecknoglobals - gochecknoinits - err113 - mnd - - gomnd - gosec - lll - nilnil diff --git a/app.go b/app.go index d7a0f17..aa6b42f 100644 --- a/app.go +++ b/app.go @@ -159,7 +159,7 @@ func echoHandler(w http.ResponseWriter, r *http.Request) { func printBinary(s []byte) { fmt.Printf("Received b:") - for n := 0; n < len(s); n++ { + for n := range s { fmt.Printf("%d,", s[n]) } fmt.Printf("\n") diff --git a/content_test.go b/content_test.go index 29eff84..e84e846 100644 --- a/content_test.go +++ b/content_test.go @@ -19,7 +19,6 @@ func Test_contentReader_Read(t *testing.T) { } for _, test := range tests { - test := test t.Run(test.name, func(t *testing.T) { t.Parallel() @@ -56,7 +55,6 @@ func Test_contentReader_ReadSeek(t *testing.T) { } for _, test := range tests { - test := test t.Run(test.name, func(t *testing.T) { t.Parallel() diff --git a/go.mod b/go.mod index 1730b68..681d1fd 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,5 @@ module github.com/traefik/whoami -go 1.21 +go 1.23 -require github.com/gorilla/websocket v1.5.1 - -require golang.org/x/net v0.25.0 // indirect +require github.com/gorilla/websocket v1.5.3 diff --git a/go.sum b/go.sum index b537248..25a9fc4 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,2 @@ -github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= -github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=