Files
Alano Terblanche ce242b0ee8 Unexport trust commands
This patch deprecates exported trust commands and moves the implementation
details to an unexported function.

Commands that are affected include:

- trust.NewTrustCommand

Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
(cherry picked from commit bd8e3e4440)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-20 14:20:43 +02:00

32 lines
786 B
Go

package trust
import (
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/spf13/cobra"
)
// NewTrustCommand returns a cobra command for `trust` subcommands
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewTrustCommand(dockerCLI command.Cli) *cobra.Command {
return newTrustCommand(dockerCLI)
}
func newTrustCommand(dockerCLI command.Cli) *cobra.Command {
cmd := &cobra.Command{
Use: "trust",
Short: "Manage trust on Docker images",
Args: cli.NoArgs,
RunE: command.ShowHelp(dockerCLI.Err()),
}
cmd.AddCommand(
newRevokeCommand(dockerCLI),
newSignCommand(dockerCLI),
newTrustKeyCommand(dockerCLI),
newTrustSignerCommand(dockerCLI),
newInspectCommand(dockerCLI),
)
return cmd
}