mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fixed a basic UI regression due to a recent godep update
In one of the latest docker UI updates, the flags structure expects to have a ShortUsage function. Without that any UI event that triggers an short usage panics. Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
parent
e228afce04
commit
c0bcb8dff3
1 changed files with 4 additions and 1 deletions
|
@ -83,6 +83,10 @@ func (cli *NetworkCli) Subcmd(chain, name, signature, description string, exitOn
|
||||||
}
|
}
|
||||||
flags := flag.NewFlagSet(name, errorHandling)
|
flags := flag.NewFlagSet(name, errorHandling)
|
||||||
flags.Usage = func() {
|
flags.Usage = func() {
|
||||||
|
flags.ShortUsage()
|
||||||
|
flags.PrintDefaults()
|
||||||
|
}
|
||||||
|
flags.ShortUsage = func() {
|
||||||
options := ""
|
options := ""
|
||||||
if signature != "" {
|
if signature != "" {
|
||||||
signature = " " + signature
|
signature = " " + signature
|
||||||
|
@ -92,7 +96,6 @@ func (cli *NetworkCli) Subcmd(chain, name, signature, description string, exitOn
|
||||||
}
|
}
|
||||||
fmt.Fprintf(cli.out, "\nUsage: %s %s%s%s\n\n%s\n\n", chain, name, options, signature, description)
|
fmt.Fprintf(cli.out, "\nUsage: %s %s%s%s\n\n%s\n\n", chain, name, options, signature, description)
|
||||||
flags.SetOutput(cli.out)
|
flags.SetOutput(cli.out)
|
||||||
flags.PrintDefaults()
|
|
||||||
}
|
}
|
||||||
return flags
|
return flags
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue