fix usage for completly deprecated flag
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
This commit is contained in:
parent
e8163b809b
commit
a5ba28e1f7
2 changed files with 4 additions and 1 deletions
|
@ -12,6 +12,7 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
flag.Bool([]string{"#hp", "#-halp"}, false, "display the halp")
|
||||||
flag.BoolVar(&b, []string{"b"}, false, "a simple bool")
|
flag.BoolVar(&b, []string{"b"}, false, "a simple bool")
|
||||||
flag.BoolVar(&b2, []string{"-bool"}, false, "a simple bool")
|
flag.BoolVar(&b2, []string{"-bool"}, false, "a simple bool")
|
||||||
flag.IntVar(&i, []string{"#integer", "-integer"}, -1, "a simple integer")
|
flag.IntVar(&i, []string{"#integer", "-integer"}, -1, "a simple integer")
|
||||||
|
|
|
@ -404,7 +404,9 @@ func (f *FlagSet) PrintDefaults() {
|
||||||
names = append(names, name)
|
names = append(names, name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fmt.Fprintf(f.out(), format, strings.Join(names, ", -"), flag.DefValue, flag.Usage)
|
if len(names) > 0 {
|
||||||
|
fmt.Fprintf(f.out(), format, strings.Join(names, ", -"), flag.DefValue, flag.Usage)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue