Skip to content

Commit 4c36401

Browse files
committed
Unexport checkpoint command
This patch unexports the `checkpoint` command. Signed-off-by: Alano Terblanche <[email protected]>
1 parent 3895eca commit 4c36401

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

cli/command/checkpoint/cmd.go

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,37 @@ package checkpoint
33
import (
44
"github.com/docker/cli/cli"
55
"github.com/docker/cli/cli/command"
6+
"github.com/docker/cli/internal/commands"
67
"github.com/spf13/cobra"
78
)
89

10+
func init() {
11+
commands.RegisterCommand(newCheckpointCommand)
12+
}
13+
914
// NewCheckpointCommand returns the `checkpoint` subcommand (only in experimental)
10-
func NewCheckpointCommand(dockerCli command.Cli) *cobra.Command {
15+
//
16+
// Deprecated: Do not import commands directly. They will be removed in a future release.
17+
func NewCheckpointCommand(dockerCLI command.Cli) *cobra.Command {
18+
return newCheckpointCommand(dockerCLI)
19+
}
20+
21+
func newCheckpointCommand(dockerCLI command.Cli) *cobra.Command {
1122
cmd := &cobra.Command{
1223
Use: "checkpoint",
1324
Short: "Manage checkpoints",
1425
Args: cli.NoArgs,
15-
RunE: command.ShowHelp(dockerCli.Err()),
26+
RunE: command.ShowHelp(dockerCLI.Err()),
1627
Annotations: map[string]string{
1728
"experimental": "",
1829
"ostype": "linux",
1930
"version": "1.25",
2031
},
2132
}
2233
cmd.AddCommand(
23-
newCreateCommand(dockerCli),
24-
newListCommand(dockerCli),
25-
newRemoveCommand(dockerCli),
34+
newCreateCommand(dockerCLI),
35+
newListCommand(dockerCLI),
36+
newRemoveCommand(dockerCLI),
2637
)
2738
return cmd
2839
}

0 commit comments

Comments
 (0)