From 08683e71337468e3482e39658d1adf3e7d34c950 Mon Sep 17 00:00:00 2001 From: "s. rannou" Date: Mon, 18 May 2015 11:33:51 +0200 Subject: [PATCH] Fix panic when using default-initialized FlagSet Closes #13294 Signed-off-by: Sebastien Rannou --- mflag/flag.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mflag/flag.go b/mflag/flag.go index 11dfb75..ce003cd 100644 --- a/mflag/flag.go +++ b/mflag/flag.go @@ -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() }