Skip to content

Commit c70acab

Browse files
Merge pull request #218 from saschagrunert/go-lint
Bump CI go version and linter
2 parents 706c87b + 0248397 commit c70acab

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

.github/workflows/test.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,18 @@ name: test
44
on: ["push", "pull_request"]
55

66
env:
7-
GO_VERSION: "1.22"
7+
GO_VERSION: "1.23"
88
LINUX_ARCHES: "amd64 386 arm arm64 s390x mips64le ppc64le"
99

1010
jobs:
1111
build:
1212
name: Build all linux architectures
1313
runs-on: ubuntu-latest
1414
steps:
15-
- name: setup go
16-
uses: actions/setup-go@v5
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-go@v5
1717
with:
1818
go-version: ${{ env.GO_VERSION }}
19-
- uses: actions/checkout@v4
2019

2120
- name: Build on all supported architectures
2221
run: |
@@ -30,11 +29,10 @@ jobs:
3029
name: Run tests on Linux amd64
3130
runs-on: ubuntu-latest
3231
steps:
33-
- name: setup go
34-
uses: actions/setup-go@v5
32+
- uses: actions/checkout@v4
33+
- uses: actions/setup-go@v5
3534
with:
3635
go-version: ${{ env.GO_VERSION }}
37-
- uses: actions/checkout@v4
3836

3937
- name: Install test binaries
4038
run: |
@@ -58,4 +56,6 @@ jobs:
5856
steps:
5957
- uses: actions/checkout@v4
6058
- uses: actions/setup-go@v5
59+
with:
60+
go-version: ${{ env.GO_VERSION }}
6161
- run: make lint

.golangci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ linters:
2323
- errname
2424
- errorlint
2525
- exhaustive
26-
- exportloopref
2726
- fatcontext
2827
- forbidigo
2928
- forcetypeassert

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ BUILD_INFO := $(shell date +%s)
1616

1717
BUILD_PATH := $(shell pwd)/build
1818
GOLANGCI_LINT := ${BUILD_PATH}/golangci-lint
19-
GOLANGCI_LINT_VERSION := v1.59.1
19+
GOLANGCI_LINT_VERSION := v1.60.3
2020

2121
# If GOPATH not specified, use one in the local directory
2222
ifeq ($(GOPATH),)

pkg/ocicni/ocicni.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ func (plugin *cniNetworkPlugin) SetUpPodWithContext(ctx context.Context, podNetw
584584

585585
// Set up loopback interface
586586
if err := bringUpLoopback(podNetwork.NetNS); err != nil {
587-
logrus.Errorf(err.Error())
587+
logrus.Error(err)
588588
return nil, err
589589
}
590590

@@ -732,7 +732,7 @@ func (plugin *cniNetworkPlugin) GetPodNetworkStatusWithContext(ctx context.Conte
732732
defer plugin.podUnlock(&podNetwork)
733733

734734
if err := checkLoopback(podNetwork.NetNS); err != nil {
735-
logrus.Errorf(err.Error())
735+
logrus.Error(err)
736736
return nil, err
737737
}
738738

0 commit comments

Comments
 (0)