From b271750516e7eed1cfd1e0d2ed1b616524c1dd83 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 10 Apr 2026 00:58:01 +0000 Subject: [PATCH] Fix CI: upgrade golangci-lint to v2.11.4 for Go 1.26 support Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/ca09eb2b-b0fa-4f27-bee6-fd867b8cec29 Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com> --- .github/workflows/ci.yaml | 2 +- pkg/helmexec/exec.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 702cf939..9d6afab1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -31,7 +31,7 @@ jobs: run: df -h - uses: golangci/golangci-lint-action@v9 with: - version: v2.6.2 + version: v2.11.4 tests: runs-on: ubuntu-latest diff --git a/pkg/helmexec/exec.go b/pkg/helmexec/exec.go index 4b061266..5af9add0 100644 --- a/pkg/helmexec/exec.go +++ b/pkg/helmexec/exec.go @@ -256,7 +256,7 @@ func (helm *execer) AddRepo(name, repository, cafile, certfile, keyfile, usernam if username != "" && password != "" { args = append(args, "--username", username, "--password-stdin") buffer := bytes.Buffer{} - buffer.Write([]byte(fmt.Sprintf("%s\n", password))) + fmt.Fprintf(&buffer, "%s\n", password) out, err = helm.execStdIn(args, map[string]string{}, &buffer) } else { out, err = helm.exec(args, map[string]string{}, nil) @@ -311,7 +311,7 @@ func (helm *execer) RegistryLogin(repository, username, password, caFile, certFi args = append(args, "--username", username, "--password-stdin") buffer := bytes.Buffer{} - buffer.Write([]byte(fmt.Sprintf("%s\n", password))) + fmt.Fprintf(&buffer, "%s\n", password) helm.logger.Info("Logging in to registry") out, err := helm.execStdIn(args, map[string]string{"HELM_EXPERIMENTAL_OCI": "1"}, &buffer)