Skip to content

Commit

Permalink
chore(ci): upgrade go to v1.23 and linter
Browse files Browse the repository at this point in the history
  • Loading branch information
mloiseleur committed Jan 21, 2025
1 parent dec1ed8 commit 651fe27
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 1 addition & 13 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 0 additions & 2 deletions content_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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()

Expand Down
6 changes: 2 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -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
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -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=

0 comments on commit 651fe27

Please sign in to comment.