From 8650ffef3864d55f56d7f56a500edb1fdd05b1c9 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 1 Feb 2025 22:18:07 +0100 Subject: [PATCH] cli/command/checkpoint: minor cleanups: use Println, rename vars - use Println to print newline instead of custom format - use dockerCLI with Go's standard camelCase casing. - suppress some errors to make my IDE and linters happier Signed-off-by: Sebastiaan van Stijn --- cli/command/checkpoint/create.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/command/checkpoint/create.go b/cli/command/checkpoint/create.go index 3ea41ee85f..8455e979e6 100644 --- a/cli/command/checkpoint/create.go +++ b/cli/command/checkpoint/create.go @@ -40,8 +40,8 @@ func newCreateCommand(dockerCli command.Cli) *cobra.Command { return cmd } -func runCreate(ctx context.Context, dockerCli command.Cli, opts createOptions) error { - err := dockerCli.Client().CheckpointCreate(ctx, opts.container, checkpoint.CreateOptions{ +func runCreate(ctx context.Context, dockerCLI command.Cli, opts createOptions) error { + err := dockerCLI.Client().CheckpointCreate(ctx, opts.container, checkpoint.CreateOptions{ CheckpointID: opts.checkpoint, CheckpointDir: opts.checkpointDir, Exit: !opts.leaveRunning, @@ -50,6 +50,6 @@ func runCreate(ctx context.Context, dockerCli command.Cli, opts createOptions) e return err } - fmt.Fprintf(dockerCli.Out(), "%s\n", opts.checkpoint) + _, _ = fmt.Fprintln(dockerCLI.Out(), opts.checkpoint) return nil }