Remove a single-use variable in Login
Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
2db91a8d01
commit
e0b05e152e
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue