Skip to content

Commit 0b6df5a

Browse files
committed
Update go and golangci-lint
1 parent d4b4cea commit 0b6df5a

File tree

5 files changed

+37
-15
lines changed

5 files changed

+37
-15
lines changed

.github/workflows/lint.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
- uses: actions/checkout@v4
3030
- uses: actions/setup-go@v5
3131
with:
32-
go-version: "~1.22"
32+
go-version: 1.24.2
3333
- name: golangci-lint
3434
uses: golangci/[email protected]
3535
with:
36-
version: v1.58.0
36+
version: v2.1.2

.golangci.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
version: "2"
2+
linters:
3+
disable:
4+
- errcheck

api/api_test.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ func TestAPI(t *testing.T) {
305305

306306
var resp *http.Response
307307
var err error
308-
if method == http.MethodPost {
308+
switch method {
309+
case http.MethodPost:
309310
var body []byte
310311
if str, ok := c.Request.(string); ok {
311312
body = []byte(str)
@@ -314,9 +315,9 @@ func TestAPI(t *testing.T) {
314315
require.NoError(t, err)
315316
}
316317
resp, err = client.Post(url, "application/json", bytes.NewReader(body))
317-
} else if method == http.MethodGet {
318+
case http.MethodGet:
318319
resp, err = client.Get(url)
319-
} else {
320+
default:
320321
t.Fatal(method + " is not handled in the test yet, please add it now")
321322
}
322323
require.NoError(t, err)

flake.lock

+26-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
in {
1111
devShells.default = pkgs.mkShell {
1212
buildInputs = with pkgs; [
13-
go_1_19
13+
go_1_24
1414
golangci-lint
1515
gotestsum
1616
kubernetes-helm

0 commit comments

Comments
 (0)