github.com/xeptore/docker-cli@v20.10.14+incompatible/cli/command/volume/cmd.go (about) 1 package volume 2 3 import ( 4 "github.com/docker/cli/cli" 5 "github.com/docker/cli/cli/command" 6 "github.com/spf13/cobra" 7 ) 8 9 // NewVolumeCommand returns a cobra command for `volume` subcommands 10 func NewVolumeCommand(dockerCli command.Cli) *cobra.Command { 11 cmd := &cobra.Command{ 12 Use: "volume COMMAND", 13 Short: "Manage volumes", 14 Args: cli.NoArgs, 15 RunE: command.ShowHelp(dockerCli.Err()), 16 Annotations: map[string]string{"version": "1.21"}, 17 } 18 cmd.AddCommand( 19 newCreateCommand(dockerCli), 20 newInspectCommand(dockerCli), 21 newListCommand(dockerCli), 22 newRemoveCommand(dockerCli), 23 NewPruneCommand(dockerCli), 24 ) 25 return cmd 26 }