Skip to content

Commit 5e7f844

Browse files
chore: use go 1.26 and golangci-lint 2.10.1 (#568)
1 parent abb0943 commit 5e7f844

13 files changed

Lines changed: 26 additions & 32 deletions

File tree

.github/workflows/go.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
os: [ubuntu-latest, macos-latest, windows-latest]
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v5
14+
uses: actions/checkout@v6
1515
with:
1616
fetch-depth: 1
1717
- name: Setup Go
@@ -32,9 +32,9 @@ jobs:
3232
run: git config --global core.autocrlf false
3333
- name: Lint
3434
if: matrix.os == 'ubuntu-latest'
35-
uses: golangci/golangci-lint-action@v8
35+
uses: golangci/golangci-lint-action@v9
3636
with:
37-
version: v2.5.0
37+
version: v2.10.1
3838
args: --timeout 10m
3939
skip-cache: false
4040
- name: Vet

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v5
15+
uses: actions/checkout@v6
1616
with:
1717
fetch-depth: 0
1818
- name: Setup Go
@@ -25,4 +25,4 @@ jobs:
2525
version: "~> v2"
2626
args: release --clean --timeout 1h
2727
env:
28-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.25 AS build
1+
FROM golang:1.26 AS build
22

33
WORKDIR /src
44
# enable modules caching in separate layer
@@ -8,7 +8,7 @@ COPY . ./
88

99
RUN make binary
1010

11-
FROM debian:12.12-slim
11+
FROM debian:12.13-slim
1212

1313
ENV DEBIAN_FRONTEND=noninteractive
1414

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GO ?= go
22
GOLANGCI_LINT ?= golangci-lint
3-
GOLANGCI_LINT_VERSION ?= v2.5.0
3+
GOLANGCI_LINT_VERSION ?= v2.10.1
44
COMMIT ?= "$(shell git describe --long --dirty --always --match "" || true)"
55
VERSION ?= "$(shell git describe --tags --abbrev=0 | cut -c2-)"
66
LDFLAGS ?= -s -w \

go.mod

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module github.com/ethersphere/beekeeper
22

3-
go 1.25.1
4-
5-
toolchain go1.25.2
3+
go 1.26
64

75
replace github.com/codahale/hdrhistogram => github.com/HdrHistogram/hdrhistogram-go v1.1.2
86

pkg/check/feed/feed_v1.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (c *CheckV1) Report() []prometheus.Collector {
5757
return c.metrics.Report()
5858
}
5959

60-
func (c *CheckV1) Run(ctx context.Context, cluster orchestration.Cluster, opts interface{}) (err error) {
60+
func (c *CheckV1) Run(ctx context.Context, cluster orchestration.Cluster, opts any) (err error) {
6161
o, ok := opts.(Options)
6262
if !ok {
6363
return fmt.Errorf("invalid options type")

pkg/check/gsoc/gsoc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ func getTargetNeighborhood(address swarm.Address, depth int) (string, error) {
235235
if err != nil {
236236
return "", err
237237
}
238-
targetNeighborhood.WriteString(fmt.Sprintf("%04b", value))
238+
fmt.Fprintf(&targetNeighborhood, "%04b", value)
239239
}
240240
return targetNeighborhood.String(), nil
241241
}

pkg/check/kademlia/kademlia.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func checkKademliaD(topologies orchestration.ClusterTopologies, logger logging.L
133133
var errmsg strings.Builder
134134
for node, c := range culprits {
135135
var msg strings.Builder
136-
msg.WriteString(fmt.Sprintf("node %s expected connection to:\n", node))
136+
fmt.Fprintf(&msg, "node %s expected connection to:\n", node)
137137
for _, addr := range c {
138138
msg.WriteString(addr.String() + "\n")
139139
}

pkg/check/longavailability/longavailability.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func (c *Check) Run(ctx context.Context, cluster orchestration.Cluster, o any) e
7777
labelValue := addr.String()
7878
node, err := findRandomNode(ctx, addr, cluster, opts.RndSeed)
7979
if err != nil {
80-
c.logger.Errorf("find node %s. Skipping. %w", addr.String(), err)
80+
c.logger.Errorf("find node %s. Skipping: %s", addr.String(), err.Error())
8181
continue
8282
}
8383

pkg/check/manifest/manifest_v1.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func NewCheckV1(logger logging.Logger) beekeeper.Action {
3333
}
3434
}
3535

36-
func (c *CheckV1) Run(ctx context.Context, cluster orchestration.Cluster, opts interface{}) (err error) {
36+
func (c *CheckV1) Run(ctx context.Context, cluster orchestration.Cluster, opts any) (err error) {
3737
o, ok := opts.(Options)
3838
if !ok {
3939
return fmt.Errorf("invalid options type")
@@ -201,7 +201,7 @@ func (c *CheckV1) downloadAndVerify(ctx context.Context, client *bee.Client, add
201201
}
202202
c.logger.Infof("downloading file: %s/%s", address, fName)
203203

204-
for i := 0; i < 10; i++ {
204+
for range 10 {
205205
select {
206206
case <-time.After(5 * time.Second):
207207
_, hash, err := client.DownloadManifestFile(ctx, address, fName)

0 commit comments

Comments
 (0)