From 1935e906c3aa1ec0496b7745501760824452bc7d Mon Sep 17 00:00:00 2001 From: Volker Theile Date: Tue, 26 Mar 2024 10:53:55 +0100 Subject: [PATCH] Bump golangci-lint + fix lint issues Signed-off-by: Volker Theile (cherry picked from commit a754baf7425904249d2c883f86d52a62528a9680) Conflicts: Dockerfile.dapper - update the golangci-lint version cmd/webhook/main.go - did not introduce to v0.1.x --- Dockerfile.dapper | 2 +- main.go | 2 +- pkg/ksmtuned/ksmd.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile.dapper b/Dockerfile.dapper index 75955952..b950e086 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -8,7 +8,7 @@ RUN zypper -n rm container-suseconnect && \ ## install golangci RUN if [ "${ARCH}" == "amd64" ]; then \ - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.52.0; \ + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.57.1; \ fi ## install controller-gen RUN if [ "${ARCH}" = "amd64" ]; then \ diff --git a/main.go b/main.go index 654dd0ad..8c63a003 100644 --- a/main.go +++ b/main.go @@ -93,7 +93,7 @@ func main() { }, } - app.Action = func(c *cli.Context) error { + app.Action = func(_ *cli.Context) error { initProfiling(&opt) initLogs(&opt) return run(&opt) diff --git a/pkg/ksmtuned/ksmd.go b/pkg/ksmtuned/ksmd.go index a17ea2a7..dcd10397 100644 --- a/pkg/ksmtuned/ksmd.go +++ b/pkg/ksmtuned/ksmd.go @@ -94,7 +94,7 @@ func (k *ksmd) toggleMergeAcrossNodes(ctx context.Context, toggle uint) (err err } ctxCancel, cancel := context.WithCancel(ctx) - wait.UntilWithContext(ctxCancel, func(ctx context.Context) { + wait.UntilWithContext(ctxCancel, func(_ context.Context) { var s *ksmdStatus s, err = k.readKsmdStatus() if err != nil || s.shared+s.sharing+s.unshared < 1 {