cli/command/volume: remove example and var for long description
This was the only command for which we set the "example" field; while we could consider doing this for other commands, we need to look what's best w.r.t. duplicating the information maintained in markdown. Also remove the intermediate variable used for the long description, as this was also the only location where we used one. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
13ef82974d
commit
987da09578
@ -25,8 +25,7 @@ func newRemoveCommand(dockerCli command.Cli) *cobra.Command {
|
||||
Use: "rm [OPTIONS] VOLUME [VOLUME...]",
|
||||
Aliases: []string{"remove"},
|
||||
Short: "Remove one or more volumes",
|
||||
Long: removeDescription,
|
||||
Example: removeExample,
|
||||
Long: "Remove one or more volumes. You cannot remove a volume that is in use by a container.",
|
||||
Args: cli.RequiresMinArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
opts.volumes = args
|
||||
@ -59,12 +58,3 @@ func runRemove(ctx context.Context, dockerCLI command.Cli, opts *removeOptions)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var removeDescription = `
|
||||
Remove one or more volumes. You cannot remove a volume that is in use by a container.
|
||||
`
|
||||
|
||||
var removeExample = `
|
||||
$ docker volume rm hello
|
||||
hello
|
||||
`
|
||||
|
@ -1,10 +1,8 @@
|
||||
# volume rm
|
||||
|
||||
<!---MARKER_GEN_START-->
|
||||
|
||||
Remove one or more volumes. You cannot remove a volume that is in use by a container.
|
||||
|
||||
|
||||
### Aliases
|
||||
|
||||
`docker volume rm`, `docker volume remove`
|
||||
|
Loading…
x
Reference in New Issue
Block a user