moby--moby/cli/command/swarm
Yong Tang 5aa5a1cb00 Show usage when `docker swarm update` has no flags
This fix tries to address the issue raised in 24352. Previously,
when `docker swarm update` has no flags, the output is
```
Swarm updated.
```
even though nothing was updated. This could be misleading for
users.

This fix tries to address the issue by adding a `PreRunE` function
in the command so that in case no flag is provided (`cmd.Flags().NFlag() == 0`),
the usage will be outputed instead.

An integration has been added to cover the changes.

This fix fixes 24352.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-12-13 05:05:04 -08:00
..
cmd.go refactor help func in CLI 2016-11-17 10:54:10 -08:00
init.go cli: Change autolock flag description 2016-11-10 12:05:19 -08:00
join.go change join node role judge 2016-10-19 19:47:42 +08:00
join_token.go Fix bunch of typos 2016-10-29 15:03:26 +08:00
leave.go add short flag for force 2016-11-09 14:40:47 +08:00
opts.go fix description of 'docker swarm init' 2016-11-28 13:24:02 +09:00
opts_test.go Move api/client -> cli/command 2016-09-08 15:46:29 -04:00
unlock.go use "golang.org/x/net/context" instead of "context" 2016-11-10 08:23:19 -08:00
unlock_key.go Add unlock key rotation 2016-11-09 16:09:01 -08:00
update.go Show usage when `docker swarm update` has no flags 2016-12-13 05:05:04 -08:00