Skip to content

Commit d9a0d6d

Browse files
committed
chore: upgrade to go 1.25
1 parent f1e0446 commit d9a0d6d

11 files changed

Lines changed: 18 additions & 15 deletions

File tree

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Install Go
1212
uses: buildjet/setup-go@v5
1313
with:
14-
go-version: 1.22.x
14+
go-version: 1.25.x
1515
- name: golangci-lint
1616
uses: golangci/golangci-lint-action@v8
1717
with:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Setup Go
3333
uses: buildjet/setup-go@v5
3434
with:
35-
go-version: v1.22.x
35+
go-version: v1.25.x
3636
- uses: buildjet/cache@v4
3737
with:
3838
path: |

.github/workflows/test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ jobs:
1111
matrix:
1212
platform: [ubuntu-latest]
1313
go-version:
14-
- 1.23.x
15-
- 1.24.x
14+
- 1.25.x
1615
runs-on: ${{ matrix.platform }}
1716
steps:
1817
- name: Install Go

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ test:
44

55
.PHONY: lint
66
lint:
7-
golangci-lint run
7+
mkdir -p bin
8+
GOBIN=$(shell realpath bin) go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.4.0
9+
./bin/golangci-lint run
810

911
.PHONY: tidy
1012
tidy:
11-
go mod tidy
13+
go mod tidy
1214

collections/priorityqueue_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ var _ = Describe("PriorityQueue", func() {
217217
// 500ms delayed item should not be available immediately
218218
item, ok = pq.Dequeue()
219219
Expect(ok).To(BeFalse())
220+
Expect(item).To(BeEmpty())
220221

221222
// After 600ms, the 500ms delayed item should be available
222223
Eventually(func() string {
@@ -246,6 +247,7 @@ var _ = Describe("PriorityQueue", func() {
246247
Expect(pq.Size()).To(BeZero())
247248
item, ok = pq.Dequeue()
248249
Expect(ok).To(BeFalse())
250+
Expect(item).To(BeEmpty())
249251
})
250252
})
251253
})

console/test_results.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func (c *TestResults) Tracef(s string, args ...interface{}) {
137137

138138
func (c *TestResults) Assert(name string, expect, actual interface{}) {
139139
if expect == actual {
140-
c.Passf(name, name)
140+
c.Passf(name, "%s", name)
141141
} else {
142142
c.Failf(name, "expected \"%v\", got \"%vs\"", expect, actual)
143143
}

go.mod

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
module github.com/flanksource/commons
22

3-
go 1.23.0
4-
5-
toolchain go1.23.4
3+
go 1.25.1
64

75
require (
6+
github.com/Masterminds/semver/v3 v3.4.0
87
github.com/Snawoot/go-http-digest-auth-client v1.1.3
98
github.com/bsm/gomega v1.27.10
109
github.com/emirpasic/gods/v2 v2.0.0-alpha
@@ -31,7 +30,6 @@ require (
3130
github.com/shirou/gopsutil/v3 v3.24.5
3231
github.com/sirupsen/logrus v1.9.3
3332
github.com/spf13/pflag v1.0.6
34-
github.com/stretchr/testify v1.10.0
3533
github.com/ulikunitz/xz v0.5.12
3634
github.com/vadimi/go-http-ntlm v1.0.3
3735
github.com/vadimi/go-http-ntlm/v2 v2.5.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
2+
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
13
github.com/Snawoot/go-http-digest-auth-client v1.1.3 h1:Xd/SNBuIUJqotzmxRpbXovBJxmlVZOT19IZZdMdrJ0Q=
24
github.com/Snawoot/go-http-digest-auth-client v1.1.3/go.mod h1:WiwNiPXTRGyjTGpBtSQJlM2wDPRRPpFGhMkMWpV4uqg=
35
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=

http/request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ func (r *Request) Debug() string {
245245
var sb strings.Builder
246246
sb.WriteString(fmt.Sprintf("%s %s\n", r.method, logger.StripSecrets(r.url.String())))
247247
for k, v := range logger.StripSecretsFromMap(r.HeaderMap()) {
248-
sb.WriteString(fmt.Sprintf(" %s: %s\n", console.Grayf(k), v))
248+
sb.WriteString(fmt.Sprintf(" %s: %s\n", console.Grayf("%s", k), v))
249249
}
250250
body, _ := io.ReadAll(r.body)
251251
sb.WriteString(logger.StripSecrets(string(body)))

http/response.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func (h *Response) Debug() string {
111111

112112
sb.WriteString(fmt.Sprintf("\n====> Status: %d\n", h.StatusCode))
113113
for k, v := range logger.StripSecretsFromMap(h.HeaderMap()) {
114-
sb.WriteString(fmt.Sprintf(" %s: %s\n", console.Grayf(k), v))
114+
sb.WriteString(fmt.Sprintf(" %s: %s\n", console.Grayf("%s", k), v))
115115
}
116116
if h.IsJSON() {
117117
r, _ := h.AsJSON()

0 commit comments

Comments
 (0)