Skip to content

Commit

Permalink
Fix lint issues for revive: unsed-parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
minamijoyo committed Aug 1, 2024
1 parent 04ec249 commit 9412616
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lock/provider_downloader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down Expand Up @@ -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)
})
Expand Down
2 changes: 1 addition & 1 deletion tfregistry/module_latest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down
2 changes: 1 addition & 1 deletion tfregistry/provider_latest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down
2 changes: 1 addition & 1 deletion tfregistry/provider_package_metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down

0 comments on commit 9412616

Please sign in to comment.