Skip to content

Commit 4d93a64

Browse files
authored
Merge pull request #6328 from Benehiko/command/trust
Unexport trust commands
2 parents d071c29 + bd8e3e4 commit 4d93a64

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

cli/command/commands/commands.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ func AddCommands(cmd *cobra.Command, dockerCli command.Cli) {
7575
plugin.NewPluginCommand(dockerCli),
7676
//nolint:staticcheck // TODO: Remove when migration to cli/internal/commands.Register is complete. (see #6283)
7777
system.NewSystemCommand(dockerCli),
78+
//nolint:staticcheck // TODO: Remove when migration to cli/internal/commands.Register is complete. (see #6283)
7879
trust.NewTrustCommand(dockerCli),
7980
//nolint:staticcheck // TODO: Remove when migration to cli/internal/commands.Register is complete. (see #6283)
8081
volume.NewVolumeCommand(dockerCli),

cli/command/trust/cmd.go

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,25 @@ import (
77
)
88

99
// NewTrustCommand returns a cobra command for `trust` subcommands
10-
func NewTrustCommand(dockerCli command.Cli) *cobra.Command {
10+
//
11+
// Deprecated: Do not import commands directly. They will be removed in a future release.
12+
func NewTrustCommand(dockerCLI command.Cli) *cobra.Command {
13+
return newTrustCommand(dockerCLI)
14+
}
15+
16+
func newTrustCommand(dockerCLI command.Cli) *cobra.Command {
1117
cmd := &cobra.Command{
1218
Use: "trust",
1319
Short: "Manage trust on Docker images",
1420
Args: cli.NoArgs,
15-
RunE: command.ShowHelp(dockerCli.Err()),
21+
RunE: command.ShowHelp(dockerCLI.Err()),
1622
}
1723
cmd.AddCommand(
18-
newRevokeCommand(dockerCli),
19-
newSignCommand(dockerCli),
20-
newTrustKeyCommand(dockerCli),
21-
newTrustSignerCommand(dockerCli),
22-
newInspectCommand(dockerCli),
24+
newRevokeCommand(dockerCLI),
25+
newSignCommand(dockerCLI),
26+
newTrustKeyCommand(dockerCLI),
27+
newTrustSignerCommand(dockerCLI),
28+
newInspectCommand(dockerCLI),
2329
)
2430
return cmd
2531
}

0 commit comments

Comments
 (0)