Skip to content

Commit 7029147

Browse files
authored
Merge pull request #5557 from thaJeztah/minor_linting_issues
2 parents d2b87a0 + 6b90837 commit 7029147

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

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)

cli/command/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ func PruneFilters(dockerCli Cli, pruneFilters filters.Args) filters.Args {
199199
// AddPlatformFlag adds `platform` to a set of flags for API version 1.32 and later.
200200
func AddPlatformFlag(flags *pflag.FlagSet, target *string) {
201201
flags.StringVar(target, "platform", os.Getenv("DOCKER_DEFAULT_PLATFORM"), "Set platform if server is multi-platform capable")
202-
flags.SetAnnotation("platform", "version", []string{"1.32"})
202+
_ = flags.SetAnnotation("platform", "version", []string{"1.32"})
203203
}
204204

205205
// ValidateOutputPath validates the output paths of the `export` and `save` commands.

0 commit comments

Comments
 (0)