From e0b05e152e1b6eba8fdf39783c397a02e4aa781c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Sat, 11 Sep 2021 17:52:44 +0200 Subject: [PATCH] Remove a single-use variable in Login MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Should not change behavior. Signed-off-by: Miloslav Trmač --- common/pkg/auth/auth.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/pkg/auth/auth.go b/common/pkg/auth/auth.go index cde00c9469..84d056a9f3 100644 --- a/common/pkg/auth/auth.go +++ b/common/pkg/auth/auth.go @@ -75,8 +75,7 @@ func Login(ctx context.Context, systemContext *types.SystemContext, opts *LoginO ref reference.Named err error ) - l := len(args) - switch l { + switch len(args) { case 0: if !opts.AcceptUnspecifiedRegistry { return errors.New("please provide a registry to login to") @@ -95,7 +94,6 @@ func Login(ctx context.Context, systemContext *types.SystemContext, opts *LoginO default: return errors.New("login accepts only one registry to login to") - } if ref != nil {