From c0581e8a38dbf923a54c05707865aad99505a19c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 29 Mar 2023 16:04:51 +0200 Subject: [PATCH] cli/trust: remove name for unused args (revive) These method must implements an interface, but don't use the argument. cli/trust/trust.go:85:40: unused-parameter: parameter 'u' seems to be unused, consider removing or renaming it as _ (revive) func (scs simpleCredentialStore) Basic(u *url.URL) (string, string) { ^ cli/trust/trust.go:89:47: unused-parameter: parameter 'u' seems to be unused, consider removing or renaming it as _ (revive) func (scs simpleCredentialStore) RefreshToken(u *url.URL, service string) string { ^ Signed-off-by: Sebastiaan van Stijn (cherry picked from commit a2d532819d32a5d332de9ba4889c4792007063f0) Signed-off-by: Sebastiaan van Stijn --- cli/trust/trust.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cli/trust/trust.go b/cli/trust/trust.go index 457f799fda..0789798dbd 100644 --- a/cli/trust/trust.go +++ b/cli/trust/trust.go @@ -82,16 +82,15 @@ type simpleCredentialStore struct { auth types.AuthConfig } -func (scs simpleCredentialStore) Basic(u *url.URL) (string, string) { +func (scs simpleCredentialStore) Basic(*url.URL) (string, string) { return scs.auth.Username, scs.auth.Password } -func (scs simpleCredentialStore) RefreshToken(u *url.URL, service string) string { +func (scs simpleCredentialStore) RefreshToken(*url.URL, string) string { return scs.auth.IdentityToken } -func (scs simpleCredentialStore) SetRefreshToken(*url.URL, string, string) { -} +func (scs simpleCredentialStore) SetRefreshToken(*url.URL, string, string) {} // GetNotaryRepository returns a NotaryRepository which stores all the // information needed to operate on a notary repository.