1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Fix panic when using default-initialized FlagSet

Closes #13294

Signed-off-by: Sebastien Rannou <mxs@sbrk.org>
This commit is contained in:
s. rannou 2015-05-18 11:33:51 +02:00
parent 9c5635a2a0
commit e94bab8278

View file

@ -560,7 +560,7 @@ func defaultUsage(f *FlagSet) {
// Usage prints to standard error a usage message documenting all defined command-line flags. // Usage prints to standard error a usage message documenting all defined command-line flags.
// The function is a variable that may be changed to point to a custom function. // The function is a variable that may be changed to point to a custom function.
var Usage = func() { var Usage = func() {
fmt.Fprintf(CommandLine.output, "Usage of %s:\n", os.Args[0]) fmt.Fprintf(CommandLine.Out(), "Usage of %s:\n", os.Args[0])
PrintDefaults() PrintDefaults()
} }