Skip to content

Commit c344251

Browse files
committed
ci: pin workflow Go to 1.25 (matches go.mod) + fix import ordering
Workflow go-version was 1.26 in all jobs but go.mod targets 1.25.0. The mismatch broke: - golangci-lint 'Go language version used to build lower than targeted' - staticcheck 'invalid array length -delta*delta' in x/tools cache (Go 1.26 constant-overflow semantics change) Fixed by flipping go-version to '1.25' in: ci.yml, quality.yml, benchmark.yml, security.yml, release.yml (14 occurrences). Also ran goimports -w across internal/, cmd/, test/ — 147 files with stdlib/3p/local import group separators standardized. The quality.yml 'Import Check' job was flagging these after setup. Tests: 49/49 packages pass, 0 fails.
1 parent e3539aa commit c344251

147 files changed

Lines changed: 297 additions & 155 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/benchmark.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Set up Go
2323
uses: actions/setup-go@v5
2424
with:
25-
go-version: '1.26'
25+
go-version: '1.25'
2626

2727
- name: Cache Go modules
2828
uses: actions/cache@v4
@@ -152,7 +152,7 @@ jobs:
152152
- name: Set up Go
153153
uses: actions/setup-go@v5
154154
with:
155-
go-version: '1.26'
155+
go-version: '1.25'
156156

157157
- name: Download Benchmark Results
158158
uses: actions/download-artifact@v4
@@ -193,7 +193,7 @@ jobs:
193193
- name: Set up Go
194194
uses: actions/setup-go@v5
195195
with:
196-
go-version: '1.26'
196+
go-version: '1.25'
197197

198198
- name: Run Cache Performance Test
199199
run: |

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
- name: Set up Go
5757
uses: actions/setup-go@v5
5858
with:
59-
go-version: '1.26'
59+
go-version: '1.25'
6060

6161
- name: Run go vet
6262
run: go vet ./...
@@ -93,7 +93,7 @@ jobs:
9393
- name: Set up Go
9494
uses: actions/setup-go@v5
9595
with:
96-
go-version: '1.26'
96+
go-version: '1.25'
9797

9898
- name: Build binary
9999
env:
@@ -122,7 +122,7 @@ jobs:
122122
- name: Set up Go
123123
uses: actions/setup-go@v5
124124
with:
125-
go-version: '1.26'
125+
go-version: '1.25'
126126

127127
- name: Run tests with coverage
128128
run: go test -coverprofile=coverage.out ./...
@@ -146,7 +146,7 @@ jobs:
146146
- name: Set up Go
147147
uses: actions/setup-go@v5
148148
with:
149-
go-version: '1.26'
149+
go-version: '1.25'
150150

151151
- name: Build binary
152152
run: go build -o tok ./cmd/tok

.github/workflows/quality.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Go
1818
uses: actions/setup-go@v5
1919
with:
20-
go-version: '1.26'
20+
go-version: '1.25'
2121

2222
- name: Run go vet
2323
run: go vet ./...
@@ -49,7 +49,7 @@ jobs:
4949
- name: Set up Go
5050
uses: actions/setup-go@v5
5151
with:
52-
go-version: '1.26'
52+
go-version: '1.25'
5353

5454
- name: Run tests with coverage
5555
run: |
@@ -90,7 +90,7 @@ jobs:
9090
- name: Set up Go
9191
uses: actions/setup-go@v5
9292
with:
93-
go-version: '1.26'
93+
go-version: '1.25'
9494

9595
- name: Run golangci-lint
9696
uses: golangci/golangci-lint-action@v6
@@ -117,7 +117,7 @@ jobs:
117117
- name: Set up Go
118118
uses: actions/setup-go@v5
119119
with:
120-
go-version: '1.26'
120+
go-version: '1.25'
121121

122122
- name: Check formatting
123123
run: |
@@ -140,7 +140,7 @@ jobs:
140140
- name: Set up Go
141141
uses: actions/setup-go@v5
142142
with:
143-
go-version: '1.26'
143+
go-version: '1.25'
144144

145145
- name: Check imports
146146
run: |

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up Go
1919
uses: actions/setup-go@v5
2020
with:
21-
go-version: '1.26'
21+
go-version: '1.25'
2222

2323
- name: Run tests
2424
run: go test -race ./...
@@ -53,7 +53,7 @@ jobs:
5353
- name: Set up Go
5454
uses: actions/setup-go@v5
5555
with:
56-
go-version: '1.26'
56+
go-version: '1.25'
5757

5858
- name: Build binary
5959
env:

.github/workflows/security.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Set up Go
3636
uses: actions/setup-go@v5
3737
with:
38-
go-version: '1.26'
38+
go-version: '1.25'
3939

4040
- name: Install govulncheck
4141
run: go install golang.org/x/vuln/cmd/govulncheck@latest

internal/commands/build/golangci.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ package build
22

33
import (
44
"fmt"
5-
out "github.com/lakshmanpatel/tok/internal/output"
65
"os/exec"
76
"strings"
87

8+
out "github.com/lakshmanpatel/tok/internal/output"
9+
910
"github.com/spf13/cobra"
1011

1112
"github.com/lakshmanpatel/tok/internal/commands/registry"

internal/commands/build/make.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package build
22

33
import (
4-
out "github.com/lakshmanpatel/tok/internal/output"
54
"os/exec"
65
"strings"
76

7+
out "github.com/lakshmanpatel/tok/internal/output"
8+
89
"github.com/spf13/cobra"
910

1011
"github.com/lakshmanpatel/tok/internal/commands/registry"

internal/commands/build/next.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ package build
22

33
import (
44
"fmt"
5-
out "github.com/lakshmanpatel/tok/internal/output"
65
"os/exec"
76
"strings"
87

8+
out "github.com/lakshmanpatel/tok/internal/output"
9+
910
"github.com/spf13/cobra"
1011

1112
"github.com/lakshmanpatel/tok/internal/commands/registry"

internal/commands/build/prisma.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ package build
22

33
import (
44
"fmt"
5-
out "github.com/lakshmanpatel/tok/internal/output"
65
"os/exec"
76
"strings"
87

8+
out "github.com/lakshmanpatel/tok/internal/output"
9+
910
"github.com/spf13/cobra"
1011

1112
"github.com/lakshmanpatel/tok/internal/commands/registry"

internal/commands/build/tsc.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ package build
33
import (
44
"bytes"
55
"fmt"
6-
out "github.com/lakshmanpatel/tok/internal/output"
76
"os"
87
"os/exec"
98
"regexp"
109
"sort"
1110
"strings"
1211

12+
out "github.com/lakshmanpatel/tok/internal/output"
13+
1314
"github.com/spf13/cobra"
1415

1516
"github.com/lakshmanpatel/tok/internal/commands/registry"

0 commit comments

Comments
 (0)