From af8ebf69db3e5f80dbf8c17a79ee9503589365d9 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Mon, 7 Nov 2016 18:40:47 -0800 Subject: [PATCH] Change to plural forms for help output of `docker service update` This fix is based on the comment in https://github.com/docker/docker/pull/27567#discussion_r86910604 Basically, in the help output of `docker service update`, the `--xxx-add` flags typically have plural forms while `--xxx-rm` flags have singular forms. This fix updates the help output for consistency. This fix also updates the related docs in `service_update.md`. The help output in `service_update.md` has been quite out-of-sync with the actual output so this fix replaces the output with the most up-to-date output. This fix is related to #27567. Signed-off-by: Yong Tang --- command/service/update.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/command/service/update.go b/command/service/update.go index c278ac1ba4..32a23f23ff 100644 --- a/command/service/update.go +++ b/command/service/update.go @@ -42,19 +42,19 @@ func newUpdateCommand(dockerCli *command.DockerCli) *cobra.Command { addServiceFlags(cmd, opts) flags.Var(newListOptsVar(), flagEnvRemove, "Remove an environment variable") - flags.Var(newListOptsVar(), flagGroupRemove, "Remove previously added supplementary user groups from the container") + flags.Var(newListOptsVar(), flagGroupRemove, "Remove a previously added supplementary user group from the container") flags.Var(newListOptsVar(), flagLabelRemove, "Remove a label by its key") flags.Var(newListOptsVar(), flagContainerLabelRemove, "Remove a container label by its key") flags.Var(newListOptsVar(), flagMountRemove, "Remove a mount by its target path") flags.Var(newListOptsVar(), flagPublishRemove, "Remove a published port by its target port") flags.Var(newListOptsVar(), flagConstraintRemove, "Remove a constraint") - flags.Var(&opts.labels, flagLabelAdd, "Add or update service labels") - flags.Var(&opts.containerLabels, flagContainerLabelAdd, "Add or update container labels") - flags.Var(&opts.env, flagEnvAdd, "Add or update environment variables") + flags.Var(&opts.labels, flagLabelAdd, "Add or update a service label") + flags.Var(&opts.containerLabels, flagContainerLabelAdd, "Add or update a container label") + flags.Var(&opts.env, flagEnvAdd, "Add or update an environment variable") flags.Var(&opts.mounts, flagMountAdd, "Add or update a mount on a service") - flags.StringSliceVar(&opts.constraints, flagConstraintAdd, []string{}, "Add or update placement constraints") + flags.StringSliceVar(&opts.constraints, flagConstraintAdd, []string{}, "Add or update a placement constraint") flags.Var(&opts.endpoint.ports, flagPublishAdd, "Add or update a published port") - flags.StringSliceVar(&opts.groups, flagGroupAdd, []string{}, "Add additional supplementary user groups to the container") + flags.StringSliceVar(&opts.groups, flagGroupAdd, []string{}, "Add an additional supplementary user group to the container") return cmd }