Skip to content

Commit a87b66a

Browse files
committed
Update Go and golangci-lint
1 parent c179a60 commit a87b66a

File tree

5 files changed

+106
-26
lines changed

5 files changed

+106
-26
lines changed

.github/workflows/lint-and-test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ jobs:
1010
- uses: actions/checkout@v4
1111
- uses: actions/setup-go@v5
1212
with:
13-
go-version: ^1.22
13+
go-version: ^1.24
1414
- name: golangci-lint
15-
uses: golangci/golangci-lint-action@v6
15+
uses: golangci/golangci-lint-action@v8
1616
with:
17-
version: v1.58.1
17+
version: v2.3.1
1818
test:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v4
2222
- name: Set up Go
2323
uses: actions/setup-go@v5
2424
with:
25-
go-version: ^1.22
25+
go-version: ^1.24
2626
id: go
2727
- name: Download dependencies
2828
run: go mod download

.golangci.yaml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,29 @@
1+
version: "2"
12
linters:
23
enable:
34
- gocritic
5+
- godot
46
- misspell
5-
- gofmt
67
- revive
7-
- varnamelen
8-
- godot
98
- testifylint
9+
- varnamelen
10+
exclusions:
11+
generated: lax
12+
presets:
13+
- comments
14+
- common-false-positives
15+
- legacy
16+
- std-error-handling
17+
paths:
18+
- third_party$
19+
- builtin$
20+
- examples$
21+
formatters:
22+
enable:
23+
- gofmt
24+
exclusions:
25+
generated: lax
26+
paths:
27+
- third_party$
28+
- builtin$
29+
- examples$

devbox.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"packages": [
3-
"go@1.22",
4-
"golangci-lint@1.56"
3+
"golangci-lint@2.3",
4+
"go@1.24"
55
],
66
"shell": {
77
"init_hook": [

devbox.lock

Lines changed: 76 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,103 @@
11
{
22
"lockfile_version": "1",
33
"packages": {
4-
"go@1.22": {
5-
"last_modified": "2024-02-10T18:15:24Z",
6-
"resolved": "github:NixOS/nixpkgs/10b813040df67c4039086db0f6eaf65c536886c6#go_1_22",
4+
"github:NixOS/nixpkgs/nixpkgs-unstable": {
5+
"last_modified": "2025-08-15T14:26:43Z",
6+
"resolved": "github:NixOS/nixpkgs/32f313e49e42f715491e1ea7b306a87c16fe0388?lastModified=1755268003&narHash=sha256-nNaeJjo861wFR0tjHDyCnHs1rbRtrMgxAKMoig9Sj%2Fw%3D"
7+
},
8+
"go@1.24": {
9+
"last_modified": "2025-07-28T17:09:23Z",
10+
"resolved": "github:NixOS/nixpkgs/648f70160c03151bc2121d179291337ad6bc564b#go",
711
"source": "devbox-search",
8-
"version": "1.22.0",
12+
"version": "1.24.5",
913
"systems": {
1014
"aarch64-darwin": {
11-
"store_path": "/nix/store/8d918c8nf7f7lq08vgd3mwaa9xccz01a-go-1.22.0"
15+
"outputs": [
16+
{
17+
"name": "out",
18+
"path": "/nix/store/kw1vd98s15vj700m3gx2x2xca2z477i3-go-1.24.5",
19+
"default": true
20+
}
21+
],
22+
"store_path": "/nix/store/kw1vd98s15vj700m3gx2x2xca2z477i3-go-1.24.5"
1223
},
1324
"aarch64-linux": {
14-
"store_path": "/nix/store/czs9i91vs8lvqfp492ppls2dq5cfjnrz-go-1.22.0"
25+
"outputs": [
26+
{
27+
"name": "out",
28+
"path": "/nix/store/5bzlaj0c4mqw9p0zrcx5g9vz16vd45dl-go-1.24.5",
29+
"default": true
30+
}
31+
],
32+
"store_path": "/nix/store/5bzlaj0c4mqw9p0zrcx5g9vz16vd45dl-go-1.24.5"
1533
},
1634
"x86_64-darwin": {
17-
"store_path": "/nix/store/a0yx16v64wm7wlk55fnf6vs7b0rqx8yr-go-1.22.0"
35+
"outputs": [
36+
{
37+
"name": "out",
38+
"path": "/nix/store/b72n20ixzl5ja9vciwahkr30bhmsn5jc-go-1.24.5",
39+
"default": true
40+
}
41+
],
42+
"store_path": "/nix/store/b72n20ixzl5ja9vciwahkr30bhmsn5jc-go-1.24.5"
1843
},
1944
"x86_64-linux": {
20-
"store_path": "/nix/store/v2hwzp398da6s8vwgckf59xxx0va00pc-go-1.22.0"
45+
"outputs": [
46+
{
47+
"name": "out",
48+
"path": "/nix/store/y4awwzp30ka130wmjrpaqjmjdf9p010w-go-1.24.5",
49+
"default": true
50+
}
51+
],
52+
"store_path": "/nix/store/y4awwzp30ka130wmjrpaqjmjdf9p010w-go-1.24.5"
2153
}
2254
}
2355
},
24-
"golangci-lint@1.56": {
25-
"last_modified": "2024-02-16T14:24:08Z",
26-
"resolved": "github:NixOS/nixpkgs/c7763249f02b7786b4ca36e13a4d7365cfba162f#golangci-lint",
56+
"golangci-lint@2.3": {
57+
"last_modified": "2025-08-03T19:18:05Z",
58+
"resolved": "github:NixOS/nixpkgs/bf9fa86a9b1005d932f842edf2c38eeecc98eef3#golangci-lint",
2759
"source": "devbox-search",
28-
"version": "1.56.2",
60+
"version": "2.3.1",
2961
"systems": {
3062
"aarch64-darwin": {
31-
"store_path": "/nix/store/wvz0nzagkyni0r3slizk6nbdsyzyr74k-golangci-lint-1.56.2"
63+
"outputs": [
64+
{
65+
"name": "out",
66+
"path": "/nix/store/ahn380skfkdg3ynimjpqakc1wp26mpsi-golangci-lint-2.3.1",
67+
"default": true
68+
}
69+
],
70+
"store_path": "/nix/store/ahn380skfkdg3ynimjpqakc1wp26mpsi-golangci-lint-2.3.1"
3271
},
3372
"aarch64-linux": {
34-
"store_path": "/nix/store/nvy66wlc0nl2z8szw14qfg38cnxi7i68-golangci-lint-1.56.2"
73+
"outputs": [
74+
{
75+
"name": "out",
76+
"path": "/nix/store/5wf61l5pnqlna9mwllllq334rkh1i2a6-golangci-lint-2.3.1",
77+
"default": true
78+
}
79+
],
80+
"store_path": "/nix/store/5wf61l5pnqlna9mwllllq334rkh1i2a6-golangci-lint-2.3.1"
3581
},
3682
"x86_64-darwin": {
37-
"store_path": "/nix/store/0jzgdaalq1d1fc6c58xh4k1pbmvn8v5j-golangci-lint-1.56.2"
83+
"outputs": [
84+
{
85+
"name": "out",
86+
"path": "/nix/store/sbqfd50kb6g4gka3w1vixjrnacspdwq5-golangci-lint-2.3.1",
87+
"default": true
88+
}
89+
],
90+
"store_path": "/nix/store/sbqfd50kb6g4gka3w1vixjrnacspdwq5-golangci-lint-2.3.1"
3891
},
3992
"x86_64-linux": {
40-
"store_path": "/nix/store/cvq0087d1qc5vn0x691zmifdrqxmwyg0-golangci-lint-1.56.2"
93+
"outputs": [
94+
{
95+
"name": "out",
96+
"path": "/nix/store/kxbsvkixvkn0ss81rbc1g814sizd1jwj-golangci-lint-2.3.1",
97+
"default": true
98+
}
99+
],
100+
"store_path": "/nix/store/kxbsvkixvkn0ss81rbc1g814sizd1jwj-golangci-lint-2.3.1"
41101
}
42102
}
43103
}

version/version_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func TestInvalidFormat(t *testing.T) {
172172
v := Version{Major: 1, Minor: 2, Patch: 3}
173173
s, err := v.Format("q")
174174
require.EqualError(t, err, "invalid format: q")
175-
assert.Equal(t, "", s)
175+
assert.Empty(t, s)
176176
}
177177

178178
func TestReleaseToString(t *testing.T) {

0 commit comments

Comments
 (0)