From 27f0b12937b7c8fc04b8a638143b9880f6b2e88d Mon Sep 17 00:00:00 2001 From: Sergey Kanzhelev Date: Sun, 22 Mar 2026 22:52:10 +0000 Subject: [PATCH] fix linter issues Signed-off-by: Sergey Kanzhelev --- core/snapshots/storage/bolt.go | 2 +- plugins/transfer/plugin.go | 4 ++-- script/setup/install-dev-tools | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/snapshots/storage/bolt.go b/core/snapshots/storage/bolt.go index f5885c6095003..be6010073c90d 100644 --- a/core/snapshots/storage/bolt.go +++ b/core/snapshots/storage/bolt.go @@ -418,7 +418,7 @@ func CommitActive(ctx context.Context, key, name string, usage snapshots.Usage, // Updates parent back link to use new key if err := pbkt.Put(parentKey(pid, id), []byte(name)); err != nil { - return fmt.Errorf("failed to update parent link %q from %q to %q: %w", pid, key, name, err) + return fmt.Errorf("failed to update parent link %v from %q to %q: %w", pid, key, name, err) } } diff --git a/plugins/transfer/plugin.go b/plugins/transfer/plugin.go index d730d45fbe3c6..f3d11283e3bce 100644 --- a/plugins/transfer/plugin.go +++ b/plugins/transfer/plugin.go @@ -123,7 +123,7 @@ func init() { applier = inst.(diff.Applier) } else { var applierID string - for name, plugin := range ic.GetAll() { + for _, plugin := range ic.GetAll() { if plugin.Registration.Type != plugins.DiffPlugin { continue } @@ -152,7 +152,7 @@ func init() { } inst, err := plugin.Instance() if err != nil { - return nil, fmt.Errorf("failed to get instance for diff plugin %q: %w", name, err) + return nil, fmt.Errorf("failed to get instance for diff plugin %q: %w", plugin.Registration.ID, err) } applier = inst.(diff.Applier) applierID = plugin.Registration.ID diff --git a/script/setup/install-dev-tools b/script/setup/install-dev-tools index 0f5e2777cc603..a3676de261e51 100755 --- a/script/setup/install-dev-tools +++ b/script/setup/install-dev-tools @@ -21,6 +21,6 @@ set -eu -o pipefail go install github.com/containerd/protobuild/cmd/go-fix-acronym@v0.3.0 go install github.com/cpuguy83/go-md2man/v2@v2.0.7 -go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.5 +go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.9.0 go install github.com/containerd/ttrpc/cmd/protoc-gen-go-ttrpc@v1.2.7 go install github.com/bufbuild/buf/cmd/buf@v1.63.0