Skip to content

Commit fb61156

Browse files
committed
cli/command/registry: fix minor linting issues
- fix camelCase naming of verifyLoginOptions - suppress unhandled errors that can be ignored Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 062eecf commit fb61156

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

cli/command/registry/login.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ func NewLoginCommand(dockerCli command.Cli) *cobra.Command {
5858
return cmd
5959
}
6060

61-
func verifyloginOptions(dockerCli command.Cli, opts *loginOptions) error {
61+
func verifyLoginOptions(dockerCli command.Cli, opts *loginOptions) error {
6262
if opts.password != "" {
63-
fmt.Fprintln(dockerCli.Err(), "WARNING! Using --password via the CLI is insecure. Use --password-stdin.")
63+
_, _ = fmt.Fprintln(dockerCli.Err(), "WARNING! Using --password via the CLI is insecure. Use --password-stdin.")
6464
if opts.passwordStdin {
6565
return errors.New("--password and --password-stdin are mutually exclusive")
6666
}
@@ -83,7 +83,7 @@ func verifyloginOptions(dockerCli command.Cli, opts *loginOptions) error {
8383
}
8484

8585
func runLogin(ctx context.Context, dockerCli command.Cli, opts loginOptions) error {
86-
if err := verifyloginOptions(dockerCli, &opts); err != nil {
86+
if err := verifyLoginOptions(dockerCli, &opts); err != nil {
8787
return err
8888
}
8989
var (
@@ -174,7 +174,7 @@ func loginUser(ctx context.Context, dockerCli command.Cli, opts loginOptions, de
174174
if !errors.Is(err, manager.ErrDeviceLoginStartFail) {
175175
return response, err
176176
}
177-
fmt.Fprint(dockerCli.Err(), "Failed to start web-based login - falling back to command line login...\n\n")
177+
_, _ = fmt.Fprint(dockerCli.Err(), "Failed to start web-based login - falling back to command line login...\n\n")
178178
}
179179

180180
return loginWithUsernameAndPassword(ctx, dockerCli, opts, defaultUsername, serverAddress)

0 commit comments

Comments
 (0)