cli/command/*: remove deprecated cobra command constructors

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-08-21 11:12:28 +02:00
parent 942a6c4c76
commit 873609d790
61 changed files with 40 additions and 436 deletions

View File

@ -15,13 +15,6 @@ func init() {
commands.RegisterLegacy(newInspectCommand)
}
// NewSystemCommand returns a cobra command for `system` subcommands
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewSystemCommand(dockerCLI command.Cli) *cobra.Command {
return newSystemCommand(dockerCLI)
}
// newSystemCommand returns a cobra command for `system` subcommands
func newSystemCommand(dockerCLI command.Cli) *cobra.Command {
cmd := &cobra.Command{

View File

@ -27,13 +27,6 @@ type eventsOptions struct {
format string
}
// NewEventsCommand creates a new cobra.Command for `docker events`
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewEventsCommand(dockerCLI command.Cli) *cobra.Command {
return newEventsCommand(dockerCLI)
}
// newEventsCommand creates a new cobra.Command for `docker events`
func newEventsCommand(dockerCLI command.Cli) *cobra.Command {
options := eventsOptions{filter: opts.NewFilterOpt()}

View File

@ -59,13 +59,6 @@ func (i *dockerInfo) clientPlatform() string {
return ""
}
// NewInfoCommand creates a new cobra.Command for `docker info`
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewInfoCommand(dockerCLI command.Cli) *cobra.Command {
return newInfoCommand(dockerCLI)
}
// newInfoCommand creates a new cobra.Command for `docker info`
func newInfoCommand(dockerCLI command.Cli) *cobra.Command {
var opts infoOptions

View File

@ -59,13 +59,6 @@ type inspectOptions struct {
ids []string
}
// NewInspectCommand creates a new cobra.Command for `docker inspect`
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewInspectCommand(dockerCLI command.Cli) *cobra.Command {
return newInspectCommand(dockerCLI)
}
// newInspectCommand creates a new cobra.Command for `docker inspect`
func newInspectCommand(dockerCLI command.Cli) *cobra.Command {
var opts inspectOptions

View File

@ -108,13 +108,6 @@ func newClientVersion(contextName string, dockerCli command.Cli) clientVersion {
return v
}
// NewVersionCommand creates a new cobra.Command for `docker version`
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewVersionCommand(dockerCLI command.Cli) *cobra.Command {
return newVersionCommand(dockerCLI)
}
// newVersionCommand creates a new cobra.Command for `docker version`
func newVersionCommand(dockerCLI command.Cli) *cobra.Command {
var opts versionOptions