diff --git a/cli/command/checkpoint/cmd.go b/cli/command/checkpoint/cmd.go index 2a698e74e5e2..14154b2627ab 100644 --- a/cli/command/checkpoint/cmd.go +++ b/cli/command/checkpoint/cmd.go @@ -7,12 +7,18 @@ import ( ) // NewCheckpointCommand returns the `checkpoint` subcommand (only in experimental) -func NewCheckpointCommand(dockerCli command.Cli) *cobra.Command { +// +// Deprecated: Do not import commands directly. They will be removed in a future release. +func NewCheckpointCommand(dockerCLI command.Cli) *cobra.Command { + return newCheckpointCommand(dockerCLI) +} + +func newCheckpointCommand(dockerCLI command.Cli) *cobra.Command { cmd := &cobra.Command{ Use: "checkpoint", Short: "Manage checkpoints", Args: cli.NoArgs, - RunE: command.ShowHelp(dockerCli.Err()), + RunE: command.ShowHelp(dockerCLI.Err()), Annotations: map[string]string{ "experimental": "", "ostype": "linux", @@ -20,9 +26,9 @@ func NewCheckpointCommand(dockerCli command.Cli) *cobra.Command { }, } cmd.AddCommand( - newCreateCommand(dockerCli), - newListCommand(dockerCli), - newRemoveCommand(dockerCli), + newCreateCommand(dockerCLI), + newListCommand(dockerCLI), + newRemoveCommand(dockerCLI), ) return cmd } diff --git a/cli/command/commands/commands.go b/cli/command/commands/commands.go index d3929293999d..1da2f940f3a0 100644 --- a/cli/command/commands/commands.go +++ b/cli/command/commands/commands.go @@ -45,6 +45,7 @@ func AddCommands(cmd *cobra.Command, dockerCli command.Cli) { // management commands builder.NewBakeStubCommand(dockerCli), builder.NewBuilderCommand(dockerCli), + //nolint:staticcheck // TODO: Remove when migration to cli/internal/commands.Register is complete. (see #6283) checkpoint.NewCheckpointCommand(dockerCli), container.NewContainerCommand(dockerCli), context.NewContextCommand(dockerCli),