chore(ci): upgrade go to v1.23 and linter
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -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:
|
||||
|
@ -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
|
||||
|
2
app.go
2
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")
|
||||
|
@ -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()
|
||||
|
||||
|
6
go.mod
6
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
|
||||
|
6
go.sum
6
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=
|
||||
|
Reference in New Issue
Block a user