From 97ca1cfdd762848f79624fa15ecfc2bfad101b46 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Mon, 26 Aug 2024 09:44:45 +0200 Subject: [PATCH] Bump CI go version and linter Signed-off-by: Sascha Grunert --- .github/workflows/test.yaml | 2 +- .golangci.yml | 1 - Makefile | 2 +- pkg/ocicni/ocicni.go | 4 ++-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8a9e527..797d2bf 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -4,7 +4,7 @@ name: test on: ["push", "pull_request"] env: - GO_VERSION: "1.22" + GO_VERSION: "1.23" LINUX_ARCHES: "amd64 386 arm arm64 s390x mips64le ppc64le" jobs: diff --git a/.golangci.yml b/.golangci.yml index 507e711..84e52e0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -23,7 +23,6 @@ linters: - errname - errorlint - exhaustive - - exportloopref - fatcontext - forbidigo - forcetypeassert diff --git a/Makefile b/Makefile index e9f34ef..082bff2 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ BUILD_INFO := $(shell date +%s) BUILD_PATH := $(shell pwd)/build GOLANGCI_LINT := ${BUILD_PATH}/golangci-lint -GOLANGCI_LINT_VERSION := v1.59.1 +GOLANGCI_LINT_VERSION := v1.60.3 # If GOPATH not specified, use one in the local directory ifeq ($(GOPATH),) diff --git a/pkg/ocicni/ocicni.go b/pkg/ocicni/ocicni.go index 1201dc7..8ad481b 100644 --- a/pkg/ocicni/ocicni.go +++ b/pkg/ocicni/ocicni.go @@ -584,7 +584,7 @@ func (plugin *cniNetworkPlugin) SetUpPodWithContext(ctx context.Context, podNetw // Set up loopback interface if err := bringUpLoopback(podNetwork.NetNS); err != nil { - logrus.Errorf(err.Error()) + logrus.Error(err) return nil, err } @@ -732,7 +732,7 @@ func (plugin *cniNetworkPlugin) GetPodNetworkStatusWithContext(ctx context.Conte defer plugin.podUnlock(&podNetwork) if err := checkLoopback(podNetwork.NetNS); err != nil { - logrus.Errorf(err.Error()) + logrus.Error(err) return nil, err }