From 60645d29f46b325347f7a713d246683784d94e35 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 25 Mar 2025 11:48:26 +0100 Subject: [PATCH] cli/trust: GetNotaryRepository: remove intermediate var Signed-off-by: Sebastiaan van Stijn --- cli/trust/trust.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cli/trust/trust.go b/cli/trust/trust.go index 5e7aff3d54..27453ae22e 100644 --- a/cli/trust/trust.go +++ b/cli/trust/trust.go @@ -160,13 +160,12 @@ func GetNotaryRepository(in io.Reader, out io.Writer, userAgent string, repoInfo Actions: actions, } creds := simpleCredentialStore{auth: *authConfig} - tokenHandlerOptions := auth.TokenHandlerOptions{ + tokenHandler := auth.NewTokenHandlerWithOptions(auth.TokenHandlerOptions{ Transport: authTransport, Credentials: creds, Scopes: []auth.Scope{scope}, ClientID: registry.AuthClientID, - } - tokenHandler := auth.NewTokenHandlerWithOptions(tokenHandlerOptions) + }) basicHandler := auth.NewBasicHandler(creds) modifiers = append(modifiers, auth.NewAuthorizer(challengeManager, tokenHandler, basicHandler)) tr := transport.NewTransport(base, modifiers...)