Skip to content

Commit 8e6de54

Browse files
authored
Merge pull request #5961 from thaJeztah/trust_remove_intermediate_var
cli/trust: GetNotaryRepository: remove intermediate var
2 parents fc817a1 + 60645d2 commit 8e6de54

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

cli/trust/trust.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,12 @@ func GetNotaryRepository(in io.Reader, out io.Writer, userAgent string, repoInfo
160160
Actions: actions,
161161
}
162162
creds := simpleCredentialStore{auth: *authConfig}
163-
tokenHandlerOptions := auth.TokenHandlerOptions{
163+
tokenHandler := auth.NewTokenHandlerWithOptions(auth.TokenHandlerOptions{
164164
Transport: authTransport,
165165
Credentials: creds,
166166
Scopes: []auth.Scope{scope},
167167
ClientID: registry.AuthClientID,
168-
}
169-
tokenHandler := auth.NewTokenHandlerWithOptions(tokenHandlerOptions)
168+
})
170169
basicHandler := auth.NewBasicHandler(creds)
171170
modifiers = append(modifiers, auth.NewAuthorizer(challengeManager, tokenHandler, basicHandler))
172171
tr := transport.NewTransport(base, modifiers...)

0 commit comments

Comments
 (0)