From 9b7aa35941dcb96ae34ac56fadef19d0a42d4ad7 Mon Sep 17 00:00:00 2001 From: Devanshu Date: Fri, 6 Dec 2024 17:09:58 +0530 Subject: [PATCH] Bump golangci-lint to 1.62 and fix govet errors Signed-off-by: Devanshu --- .github/workflows/golangci-lint.yml | 2 +- pkg/vendir/fetch/githubrelease/sync.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 89e6f18d..598cd072 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -22,6 +22,6 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: - version: v1.60 + version: v1.62 args: -v diff --git a/pkg/vendir/fetch/githubrelease/sync.go b/pkg/vendir/fetch/githubrelease/sync.go index 9538dc78..94629b93 100644 --- a/pkg/vendir/fetch/githubrelease/sync.go +++ b/pkg/vendir/fetch/githubrelease/sync.go @@ -324,7 +324,7 @@ func (d Sync) downloadAPIResponse(url string, authToken string) ([]byte, error) bs, _ := io.ReadAll(resp.Body) errMsg += fmt.Sprintf(" %s (body: '%s')", hintMsg, bs) } - return bs, fmt.Errorf(errMsg) + return bs, fmt.Errorf("%s", errMsg) } bs, err = io.ReadAll(resp.Body) @@ -362,7 +362,7 @@ func (d Sync) downloadFile(url, dstPath, authToken string) error { bs, _ := io.ReadAll(resp.Body) errMsg += fmt.Sprintf(" %s (body: '%s')", hintMsg, bs) } - return fmt.Errorf(errMsg) + return fmt.Errorf("%s", errMsg) } out, err := os.Create(dstPath)