-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Expand file tree
/
Copy pathcmd.go
More file actions
34 lines (31 loc) · 955 Bytes
/
cmd.go
File metadata and controls
34 lines (31 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package volume
import (
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/spf13/cobra"
)
// NewVolumeCommand returns a cobra command for `volume` subcommands
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewVolumeCommand(dockerCLI command.Cli) *cobra.Command {
return newVolumeCommand(dockerCLI)
}
// newVolumeCommand returns a cobra command for `volume` subcommands
func newVolumeCommand(dockerCLI command.Cli) *cobra.Command {
cmd := &cobra.Command{
Use: "volume COMMAND",
Short: "Manage volumes",
Args: cli.NoArgs,
RunE: command.ShowHelp(dockerCLI.Err()),
Annotations: map[string]string{"version": "1.21"},
}
cmd.AddCommand(
newCreateCommand(dockerCLI),
newInspectCommand(dockerCLI),
newListCommand(dockerCLI),
newRemoveCommand(dockerCLI),
newPruneCommand(dockerCLI),
newUpdateCommand(dockerCLI),
)
return cmd
}