From 4a0c40664a3a0c7980aafa883e00f11964605c43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Lipt=C3=A1k?= Date: Thu, 18 Oct 2018 22:00:26 -0400 Subject: [PATCH] Correct redundant nil check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gábor Lipták --- remotes/docker/authorizer.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/remotes/docker/authorizer.go b/remotes/docker/authorizer.go index bb691f183..2d88c9f17 100644 --- a/remotes/docker/authorizer.go +++ b/remotes/docker/authorizer.go @@ -80,11 +80,7 @@ func (a *dockerAuthorizer) AddResponses(ctx context.Context, responses []*http.R // TODO(dmcg): Store challenge, not token // Move token fetching to authorize - if err := a.setTokenAuth(ctx, host, c.parameters); err != nil { - return err - } - - return nil + return a.setTokenAuth(ctx, host, c.parameters) } else if c.scheme == basicAuth { // TODO: Resolve credentials on authorize username, secret, err := a.credentials(host)