moby--moby/cli
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
..
command Show usage when `docker swarm update` has no flags 2016-12-13 05:05:04 -08:00
flags Add for String 2016-11-03 16:15:26 +08:00
cobra.go exit with status 1 if help is called on an invalid command. 2016-11-23 15:13:58 -05:00
error.go
required.go