Skip to content

Commit 8650ffe

Browse files
committed
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 <github@gone.nl>
1 parent b10b79e commit 8650ffe

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cli/command/checkpoint/create.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ func newCreateCommand(dockerCli command.Cli) *cobra.Command {
4040
return cmd
4141
}
4242

43-
func runCreate(ctx context.Context, dockerCli command.Cli, opts createOptions) error {
44-
err := dockerCli.Client().CheckpointCreate(ctx, opts.container, checkpoint.CreateOptions{
43+
func runCreate(ctx context.Context, dockerCLI command.Cli, opts createOptions) error {
44+
err := dockerCLI.Client().CheckpointCreate(ctx, opts.container, checkpoint.CreateOptions{
4545
CheckpointID: opts.checkpoint,
4646
CheckpointDir: opts.checkpointDir,
4747
Exit: !opts.leaveRunning,
@@ -50,6 +50,6 @@ func runCreate(ctx context.Context, dockerCli command.Cli, opts createOptions) e
5050
return err
5151
}
5252

53-
fmt.Fprintf(dockerCli.Out(), "%s\n", opts.checkpoint)
53+
_, _ = fmt.Fprintln(dockerCLI.Out(), opts.checkpoint)
5454
return nil
5555
}

0 commit comments

Comments
 (0)