Fix panic when using default-initialized FlagSet

Closes #13294

Signed-off-by: Sebastien Rannou <mxs@sbrk.org>
Upstream-commit: e94bab8278ed5672d75a4c1121ef4a6c3febc5b9
Component: engine
This commit is contained in:
s. rannou
2015-05-18 11:55:38 +02:00
parent d20fd1e820
commit 34e0bf8384
+1 -1
View File
@@ -560,7 +560,7 @@ func defaultUsage(f *FlagSet) {
// 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.
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()
}