mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Normalize the log for docker subcommand usage,
delete unecessary blank after "[OPTIONS] " and add a blank to the log between options and signature. To make the code style consistency. Signed-off-by: Zen Lin(Zhinan Lin) <linzhinan@huawei.com>
This commit is contained in:
parent
f63a29ddee
commit
2b051bcbda
2 changed files with 7 additions and 4 deletions
|
@ -93,6 +93,9 @@ func (cli *DockerCli) Subcmd(name, signature, description string, exitOnError bo
|
||||||
flags := flag.NewFlagSet(name, errorHandling)
|
flags := flag.NewFlagSet(name, errorHandling)
|
||||||
flags.Usage = func() {
|
flags.Usage = func() {
|
||||||
options := ""
|
options := ""
|
||||||
|
if signature != "" {
|
||||||
|
signature = " " + signature
|
||||||
|
}
|
||||||
if flags.FlagCountUndeprecated() > 0 {
|
if flags.FlagCountUndeprecated() > 0 {
|
||||||
options = " [OPTIONS]"
|
options = " [OPTIONS]"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue