Skip to content

Commit 987da09

Browse files
committed
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>
1 parent 13ef829 commit 987da09

2 files changed

Lines changed: 1 addition & 13 deletions

File tree

cli/command/volume/remove.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ func newRemoveCommand(dockerCli command.Cli) *cobra.Command {
2525
Use: "rm [OPTIONS] VOLUME [VOLUME...]",
2626
Aliases: []string{"remove"},
2727
Short: "Remove one or more volumes",
28-
Long: removeDescription,
29-
Example: removeExample,
28+
Long: "Remove one or more volumes. You cannot remove a volume that is in use by a container.",
3029
Args: cli.RequiresMinArgs(1),
3130
RunE: func(cmd *cobra.Command, args []string) error {
3231
opts.volumes = args
@@ -59,12 +58,3 @@ func runRemove(ctx context.Context, dockerCLI command.Cli, opts *removeOptions)
5958
}
6059
return nil
6160
}
62-
63-
var removeDescription = `
64-
Remove one or more volumes. You cannot remove a volume that is in use by a container.
65-
`
66-
67-
var removeExample = `
68-
$ docker volume rm hello
69-
hello
70-
`

docs/reference/commandline/volume_rm.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# volume rm
22

33
<!---MARKER_GEN_START-->
4-
54
Remove one or more volumes. You cannot remove a volume that is in use by a container.
65

7-
86
### Aliases
97

108
`docker volume rm`, `docker volume remove`

0 commit comments

Comments
 (0)