Skip to content

Commit dec1ed8

Browse files
authored
chore: update CI, dependencies, and linter
1 parent a7324d7 commit dec1ed8

File tree

7 files changed

+27
-23
lines changed

7 files changed

+27
-23
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ jobs:
1313
runs-on: ubuntu-latest
1414
env:
1515
GO_VERSION: stable
16-
GOLANGCI_LINT_VERSION: v1.54.2
16+
GOLANGCI_LINT_VERSION: v1.58.0
1717
CGO_ENABLED: 0
1818

1919
steps:
2020

2121
# https://github.com/marketplace/actions/checkout
2222
- name: Check out code
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2424
with:
2525
fetch-depth: 0
2626

2727
# https://github.com/marketplace/actions/setup-go-environment
2828
- name: Set up Go ${{ env.GO_VERSION }}
29-
uses: actions/setup-go@v4
29+
uses: actions/setup-go@v5
3030
with:
3131
go-version: ${{ env.GO_VERSION }}
3232

.github/workflows/go-cross.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ jobs:
2121
steps:
2222
# https://github.com/marketplace/actions/checkout
2323
- name: Checkout code
24-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
2525

2626
# https://github.com/marketplace/actions/setup-go-environment
2727
- name: Set up Go ${{ matrix.go-version }}
28-
uses: actions/setup-go@v4
28+
uses: actions/setup-go@v5
2929
with:
3030
go-version: ${{ matrix.go-version }}
3131

.github/workflows/release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,40 @@ jobs:
1616

1717
# https://github.com/marketplace/actions/checkout
1818
- name: Check out code
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020
with:
2121
fetch-depth: 0
2222

2323
# https://github.com/marketplace/actions/setup-go-environment
2424
- name: Set up Go ${{ env.GO_VERSION }}
25-
uses: actions/setup-go@v4
25+
uses: actions/setup-go@v5
2626
with:
2727
go-version: ${{ env.GO_VERSION }}
2828

2929
- name: dockerhub-login
30-
uses: docker/login-action@v1
30+
uses: docker/login-action@v3
3131
with:
3232
username: ${{ secrets.DOCKER_USERNAME }}
3333
password: ${{ secrets.DOCKER_PASSWORD }}
3434

3535
- name: ghcr-login
36-
uses: docker/login-action@v1
36+
uses: docker/login-action@v3
3737
with:
3838
registry: ghcr.io
3939
username: traefiker
4040
password: ${{ secrets.GHCR_TOKEN }}
4141

4242
- name: Set up QEMU
43-
uses: docker/setup-qemu-action@v2
43+
uses: docker/setup-qemu-action@v3
4444

4545
- name: Set up Docker Buildx
46-
uses: docker/setup-buildx-action@v2
46+
uses: docker/setup-buildx-action@v3
4747

4848
# https://goreleaser.com/ci/actions/
4949
- name: Run GoReleaser
50-
uses: goreleaser/goreleaser-action@v2
50+
uses: goreleaser/goreleaser-action@v5
5151
with:
5252
version: latest
53-
args: release --rm-dist
53+
args: release --clean
5454
env:
5555
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_REPO }}

.golangci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
run:
22
timeout: 2m
3-
skip-files: []
43

54
linters-settings:
65
govet:
@@ -74,7 +73,8 @@ linters:
7473
- forbidigo
7574
- gochecknoglobals
7675
- gochecknoinits
77-
- goerr113
76+
- err113
77+
- mnd
7878
- gomnd
7979
- gosec
8080
- lll
@@ -90,7 +90,7 @@ linters:
9090

9191
issues:
9292
exclude-use-default: false
93-
max-per-linter: 0
93+
max-issues-per-linter: 0
9494
max-same-issues: 0
9595
exclude:
9696
- 'package-comments: should have a package comment'

app.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const (
3131
var upgrader = websocket.Upgrader{
3232
ReadBufferSize: 1024,
3333
WriteBufferSize: 1024,
34-
CheckOrigin: func(r *http.Request) bool {
34+
CheckOrigin: func(_ *http.Request) bool {
3535
return true
3636
},
3737
}
@@ -89,7 +89,7 @@ func main() {
8989
Handler: mux,
9090
}
9191

92-
if len(ca) > 0 {
92+
if ca != "" {
9393
server.TLSConfig = setupMutualTLS(ca)
9494
}
9595

@@ -211,7 +211,7 @@ func whoamiHandler(w http.ResponseWriter, r *http.Request) {
211211
queryParams := r.URL.Query()
212212

213213
wait := queryParams.Get("wait")
214-
if len(wait) > 0 {
214+
if wait != "" {
215215
duration, err := time.ParseDuration(wait)
216216
if err == nil {
217217
time.Sleep(duration)

go.mod

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module github.com/traefik/whoami
22

3-
go 1.20
3+
go 1.21
44

5-
require github.com/gorilla/websocket v1.5.0
5+
require github.com/gorilla/websocket v1.5.1
6+
7+
require golang.org/x/net v0.25.0 // indirect

go.sum

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
2-
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
1+
github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY=
2+
github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY=
3+
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
4+
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=

0 commit comments

Comments
 (0)