Skip to content

Commit 6ad1d46

Browse files
authored
Merge pull request #6285 from Benehiko/commands/checkpoint
Unexport checkpoint command
2 parents 2d97922 + 3265cea commit 6ad1d46

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

cli/command/checkpoint/cmd.go

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,28 @@ import (
77
)
88

99
// NewCheckpointCommand returns the `checkpoint` subcommand (only in experimental)
10-
func NewCheckpointCommand(dockerCli command.Cli) *cobra.Command {
10+
//
11+
// Deprecated: Do not import commands directly. They will be removed in a future release.
12+
func NewCheckpointCommand(dockerCLI command.Cli) *cobra.Command {
13+
return newCheckpointCommand(dockerCLI)
14+
}
15+
16+
func newCheckpointCommand(dockerCLI command.Cli) *cobra.Command {
1117
cmd := &cobra.Command{
1218
Use: "checkpoint",
1319
Short: "Manage checkpoints",
1420
Args: cli.NoArgs,
15-
RunE: command.ShowHelp(dockerCli.Err()),
21+
RunE: command.ShowHelp(dockerCLI.Err()),
1622
Annotations: map[string]string{
1723
"experimental": "",
1824
"ostype": "linux",
1925
"version": "1.25",
2026
},
2127
}
2228
cmd.AddCommand(
23-
newCreateCommand(dockerCli),
24-
newListCommand(dockerCli),
25-
newRemoveCommand(dockerCli),
29+
newCreateCommand(dockerCLI),
30+
newListCommand(dockerCLI),
31+
newRemoveCommand(dockerCLI),
2632
)
2733
return cmd
2834
}

cli/command/commands/commands.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ func AddCommands(cmd *cobra.Command, dockerCli command.Cli) {
4747
builder.NewBakeStubCommand(dockerCli),
4848
//nolint:staticcheck // TODO: Remove when migration to cli/internal/commands.Register is complete. (see #6283)
4949
builder.NewBuilderCommand(dockerCli),
50+
//nolint:staticcheck // TODO: Remove when migration to cli/internal/commands.Register is complete. (see #6283)
5051
checkpoint.NewCheckpointCommand(dockerCli),
5152
container.NewContainerCommand(dockerCli),
5253
context.NewContextCommand(dockerCli),

0 commit comments

Comments
 (0)