From 9252fae838de67cca89e32d740c1ed7af3c8abda Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 29 Mar 2023 16:00:17 +0200 Subject: [PATCH] cli/registry/client: AuthorizeRequest(): remove name for unused arg (revive) This method implements the interface defined in distribution, but doesn't use the argument. cli/registry/client/endpoint.go:123:69: unused-parameter: parameter 'params' seems to be unused, consider removing or renaming it as _ (revive) func (th *existingTokenHandler) AuthorizeRequest(req *http.Request, params map[string]string) error { ^ Signed-off-by: Sebastiaan van Stijn --- cli/registry/client/endpoint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/registry/client/endpoint.go b/cli/registry/client/endpoint.go index f69c5c0dc2..31295eed33 100644 --- a/cli/registry/client/endpoint.go +++ b/cli/registry/client/endpoint.go @@ -120,7 +120,7 @@ type existingTokenHandler struct { token string } -func (th *existingTokenHandler) AuthorizeRequest(req *http.Request, params map[string]string) error { +func (th *existingTokenHandler) AuthorizeRequest(req *http.Request, _ map[string]string) error { req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", th.token)) return nil }