Skip to content

Commit cd859b3

Browse files
authored
Merge pull request #6318 from Benehiko/command/manifest
Unexport manifest command
2 parents 1d34432 + 02fda07 commit cd859b3

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

cli/command/commands/commands.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ func AddCommands(cmd *cobra.Command, dockerCli command.Cli) {
6363
context.NewContextCommand(dockerCli),
6464
//nolint:staticcheck // TODO: Remove when migration to cli/internal/commands.Register is complete. (see #6283)
6565
image.NewImageCommand(dockerCli),
66+
//nolint:staticcheck // TODO: Remove when migration to cli/internal/commands.Register is complete. (see #6283)
6667
manifest.NewManifestCommand(dockerCli),
6768
//nolint:staticcheck // TODO: Remove when migration to cli/internal/commands.Register is complete. (see #6283)
6869
network.NewNetworkCommand(dockerCli),

cli/command/manifest/cmd.go

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,31 @@ import (
1010
)
1111

1212
// NewManifestCommand returns a cobra command for `manifest` subcommands
13-
func NewManifestCommand(dockerCli command.Cli) *cobra.Command {
13+
//
14+
// Deprecated: Do not import commands directly. They will be removed in a future release.
15+
func NewManifestCommand(dockerCLI command.Cli) *cobra.Command {
16+
return newManifestCommand(dockerCLI)
17+
}
18+
19+
// newManifestCommand returns a cobra command for `manifest` subcommands
20+
func newManifestCommand(dockerCLI command.Cli) *cobra.Command {
1421
// use dockerCli as command.Cli
1522
cmd := &cobra.Command{
1623
Use: "manifest COMMAND",
1724
Short: "Manage Docker image manifests and manifest lists",
1825
Long: manifestDescription,
1926
Args: cli.NoArgs,
2027
Run: func(cmd *cobra.Command, args []string) {
21-
_, _ = fmt.Fprint(dockerCli.Err(), "\n"+cmd.UsageString())
28+
_, _ = fmt.Fprint(dockerCLI.Err(), "\n"+cmd.UsageString())
2229
},
2330
Annotations: map[string]string{"experimentalCLI": ""},
2431
}
2532
cmd.AddCommand(
26-
newCreateListCommand(dockerCli),
27-
newInspectCommand(dockerCli),
28-
newAnnotateCommand(dockerCli),
29-
newPushListCommand(dockerCli),
30-
newRmManifestListCommand(dockerCli),
33+
newCreateListCommand(dockerCLI),
34+
newInspectCommand(dockerCLI),
35+
newAnnotateCommand(dockerCLI),
36+
newPushListCommand(dockerCLI),
37+
newRmManifestListCommand(dockerCLI),
3138
)
3239
return cmd
3340
}

0 commit comments

Comments
 (0)