From 31c5b957e274222c037ccbf42c80e49c624104dc Mon Sep 17 00:00:00 2001 From: allencloud Date: Wed, 9 Nov 2016 14:22:06 +0800 Subject: [PATCH] add short flag for force Signed-off-by: allencloud --- command/node/remove.go | 2 +- command/swarm/leave.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command/node/remove.go b/command/node/remove.go index 3b89db8661..19b4a96631 100644 --- a/command/node/remove.go +++ b/command/node/remove.go @@ -29,7 +29,7 @@ func newRemoveCommand(dockerCli *command.DockerCli) *cobra.Command { }, } flags := cmd.Flags() - flags.BoolVar(&opts.force, "force", false, "Force remove a node from the swarm") + flags.BoolVarP(&opts.force, "force", "f", false, "Force remove a node from the swarm") return cmd } diff --git a/command/swarm/leave.go b/command/swarm/leave.go index ae13884154..1ffaa3fcc9 100644 --- a/command/swarm/leave.go +++ b/command/swarm/leave.go @@ -27,7 +27,7 @@ func newLeaveCommand(dockerCli *command.DockerCli) *cobra.Command { } flags := cmd.Flags() - flags.BoolVar(&opts.force, "force", false, "Force this node to leave the swarm, ignoring warnings") + flags.BoolVarP(&opts.force, "force", "f", false, "Force this node to leave the swarm, ignoring warnings") return cmd }