mirror of https://github.com/docker/cli.git
commands.AddCommands(): re-order/group commands
Order/group the commands the commands Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
ed71a5091d
commit
cea26ac86b
|
@ -28,69 +28,36 @@ import (
|
||||||
// AddCommands adds all the commands from cli/command to the root command
|
// AddCommands adds all the commands from cli/command to the root command
|
||||||
func AddCommands(cmd *cobra.Command, dockerCli command.Cli) {
|
func AddCommands(cmd *cobra.Command, dockerCli command.Cli) {
|
||||||
cmd.AddCommand(
|
cmd.AddCommand(
|
||||||
// checkpoint
|
// commonly used shorthands
|
||||||
checkpoint.NewCheckpointCommand(dockerCli),
|
|
||||||
|
|
||||||
// config
|
|
||||||
config.NewConfigCommand(dockerCli),
|
|
||||||
|
|
||||||
// container
|
|
||||||
container.NewContainerCommand(dockerCli),
|
|
||||||
container.NewRunCommand(dockerCli),
|
container.NewRunCommand(dockerCli),
|
||||||
|
|
||||||
// image
|
|
||||||
image.NewImageCommand(dockerCli),
|
|
||||||
image.NewBuildCommand(dockerCli),
|
image.NewBuildCommand(dockerCli),
|
||||||
|
|
||||||
// builder
|
|
||||||
builder.NewBuilderCommand(dockerCli),
|
|
||||||
|
|
||||||
// manifest
|
|
||||||
manifest.NewManifestCommand(dockerCli),
|
|
||||||
|
|
||||||
// network
|
|
||||||
network.NewNetworkCommand(dockerCli),
|
|
||||||
|
|
||||||
// node
|
|
||||||
node.NewNodeCommand(dockerCli),
|
|
||||||
|
|
||||||
// plugin
|
|
||||||
plugin.NewPluginCommand(dockerCli),
|
|
||||||
|
|
||||||
// registry
|
|
||||||
registry.NewLoginCommand(dockerCli),
|
registry.NewLoginCommand(dockerCli),
|
||||||
registry.NewLogoutCommand(dockerCli),
|
registry.NewLogoutCommand(dockerCli),
|
||||||
registry.NewSearchCommand(dockerCli),
|
registry.NewSearchCommand(dockerCli),
|
||||||
|
|
||||||
// secret
|
|
||||||
secret.NewSecretCommand(dockerCli),
|
|
||||||
|
|
||||||
// service
|
|
||||||
service.NewServiceCommand(dockerCli),
|
|
||||||
|
|
||||||
// system
|
|
||||||
system.NewSystemCommand(dockerCli),
|
|
||||||
system.NewVersionCommand(dockerCli),
|
system.NewVersionCommand(dockerCli),
|
||||||
|
|
||||||
// stack
|
// management commands
|
||||||
stack.NewStackCommand(dockerCli),
|
builder.NewBuilderCommand(dockerCli),
|
||||||
|
checkpoint.NewCheckpointCommand(dockerCli),
|
||||||
// swarm
|
container.NewContainerCommand(dockerCli),
|
||||||
swarm.NewSwarmCommand(dockerCli),
|
context.NewContextCommand(dockerCli),
|
||||||
|
image.NewImageCommand(dockerCli),
|
||||||
// trust
|
manifest.NewManifestCommand(dockerCli),
|
||||||
|
network.NewNetworkCommand(dockerCli),
|
||||||
|
plugin.NewPluginCommand(dockerCli),
|
||||||
|
system.NewSystemCommand(dockerCli),
|
||||||
trust.NewTrustCommand(dockerCli),
|
trust.NewTrustCommand(dockerCli),
|
||||||
|
|
||||||
// volume
|
|
||||||
volume.NewVolumeCommand(dockerCli),
|
volume.NewVolumeCommand(dockerCli),
|
||||||
|
|
||||||
// context
|
// orchestration (swarm) commands
|
||||||
context.NewContextCommand(dockerCli),
|
config.NewConfigCommand(dockerCli),
|
||||||
|
node.NewNodeCommand(dockerCli),
|
||||||
|
secret.NewSecretCommand(dockerCli),
|
||||||
|
service.NewServiceCommand(dockerCli),
|
||||||
|
stack.NewStackCommand(dockerCli),
|
||||||
|
swarm.NewSwarmCommand(dockerCli),
|
||||||
|
|
||||||
// legacy commands may be hidden
|
// legacy commands may be hidden
|
||||||
hide(system.NewEventsCommand(dockerCli)),
|
|
||||||
hide(system.NewInfoCommand(dockerCli)),
|
|
||||||
hide(system.NewInspectCommand(dockerCli)),
|
|
||||||
hide(container.NewAttachCommand(dockerCli)),
|
hide(container.NewAttachCommand(dockerCli)),
|
||||||
hide(container.NewCommitCommand(dockerCli)),
|
hide(container.NewCommitCommand(dockerCli)),
|
||||||
hide(container.NewCopyCommand(dockerCli)),
|
hide(container.NewCopyCommand(dockerCli)),
|
||||||
|
@ -122,6 +89,9 @@ func AddCommands(cmd *cobra.Command, dockerCli command.Cli) {
|
||||||
hide(image.NewRemoveCommand(dockerCli)),
|
hide(image.NewRemoveCommand(dockerCli)),
|
||||||
hide(image.NewSaveCommand(dockerCli)),
|
hide(image.NewSaveCommand(dockerCli)),
|
||||||
hide(image.NewTagCommand(dockerCli)),
|
hide(image.NewTagCommand(dockerCli)),
|
||||||
|
hide(system.NewEventsCommand(dockerCli)),
|
||||||
|
hide(system.NewInfoCommand(dockerCli)),
|
||||||
|
hide(system.NewInspectCommand(dockerCli)),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue