From 987da09578134c12c8dc2bd959f83dbcdc416fe4 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 1 Feb 2025 19:31:47 +0100 Subject: [PATCH] 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 --- cli/command/volume/remove.go | 12 +----------- docs/reference/commandline/volume_rm.md | 2 -- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/cli/command/volume/remove.go b/cli/command/volume/remove.go index c436182d63..1eb3887347 100644 --- a/cli/command/volume/remove.go +++ b/cli/command/volume/remove.go @@ -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 -` diff --git a/docs/reference/commandline/volume_rm.md b/docs/reference/commandline/volume_rm.md index eaa720d852..32a2c77dd7 100644 --- a/docs/reference/commandline/volume_rm.md +++ b/docs/reference/commandline/volume_rm.md @@ -1,10 +1,8 @@ # volume rm - Remove one or more volumes. You cannot remove a volume that is in use by a container. - ### Aliases `docker volume rm`, `docker volume remove`