diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index aa1ec87..0f3b9fb 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -20,6 +20,6 @@ jobs: with: go-version-file: '.go-version' - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: - version: v1.54.2 + version: v1.59.1 diff --git a/lock/provider_downloader_test.go b/lock/provider_downloader_test.go index 761cc61..2f34d24 100644 --- a/lock/provider_downloader_test.go +++ b/lock/provider_downloader_test.go @@ -29,11 +29,11 @@ fc5bbdd0a1bd6715b9afddf3aba6acc494425d77015c19579b9a9fa950e532b2 terraform-prov `) mux, mockServerURL := newMockServer() - mux.HandleFunc(downloadPath, func(w http.ResponseWriter, r *http.Request) { + mux.HandleFunc(downloadPath, func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(200) _, _ = w.Write(zipData) }) - mux.HandleFunc(shaSumsPath, func(w http.ResponseWriter, r *http.Request) { + mux.HandleFunc(shaSumsPath, func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(200) _, _ = w.Write(shaSumsData) }) @@ -157,7 +157,7 @@ func TestProviderDownloaderClientDownload(t *testing.T) { api: &mockTFRegistryClient{}, } client := newTestClient(mockServerURL, config) - mux.HandleFunc(tc.subPath, func(w http.ResponseWriter, r *http.Request) { + mux.HandleFunc(tc.subPath, func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(tc.code) _, _ = w.Write(tc.res) }) diff --git a/tfregistry/module_latest_test.go b/tfregistry/module_latest_test.go index a0dd7b2..67b6693 100644 --- a/tfregistry/module_latest_test.go +++ b/tfregistry/module_latest_test.go @@ -87,7 +87,7 @@ func TestModuleLatestForProvider(t *testing.T) { mux, mockServerURL := newMockServer() client := newTestClient(mockServerURL) subPath := fmt.Sprintf("%s%s/%s/%s", moduleV1Service, tc.req.Namespace, tc.req.Name, tc.req.Provider) - mux.HandleFunc(subPath, func(w http.ResponseWriter, r *http.Request) { + mux.HandleFunc(subPath, func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(tc.code) fmt.Fprint(w, tc.res) }) diff --git a/tfregistry/provider_latest_test.go b/tfregistry/provider_latest_test.go index 4aaf9d0..ccedba2 100644 --- a/tfregistry/provider_latest_test.go +++ b/tfregistry/provider_latest_test.go @@ -71,7 +71,7 @@ func TestProviderLatest(t *testing.T) { mux, mockServerURL := newMockServer() client := newTestClient(mockServerURL) subPath := fmt.Sprintf("%s%s/%s", providerV1Service, tc.req.Namespace, tc.req.Type) - mux.HandleFunc(subPath, func(w http.ResponseWriter, r *http.Request) { + mux.HandleFunc(subPath, func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(tc.code) fmt.Fprint(w, tc.res) }) diff --git a/tfregistry/provider_package_metadata_test.go b/tfregistry/provider_package_metadata_test.go index cd263c4..d261cfa 100644 --- a/tfregistry/provider_package_metadata_test.go +++ b/tfregistry/provider_package_metadata_test.go @@ -127,7 +127,7 @@ func TestProviderPackageMetadata(t *testing.T) { mux, mockServerURL := newMockServer() client := newTestClient(mockServerURL) subPath := fmt.Sprintf("%s%s/%s/%s/download/%s/%s", providerV1Service, tc.req.Namespace, tc.req.Type, tc.req.Version, tc.req.OS, tc.req.Arch) - mux.HandleFunc(subPath, func(w http.ResponseWriter, r *http.Request) { + mux.HandleFunc(subPath, func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(tc.code) fmt.Fprint(w, tc.res) })