From 70afd51ec53095727989f64365fb342082f06832 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 28 Mar 2018 07:44:06 -0700 Subject: [PATCH] flag: document use of FlagSet name parameter Fixes #24225 Change-Id: I876ac1b9d3615283f7b88cfa0b965ef81a57f056 Reviewed-on: https://go-review.googlesource.com/102955 Reviewed-by: Rob Pike --- src/flag/flag.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/flag/flag.go b/src/flag/flag.go index edde5282cf..358402345c 100644 --- a/src/flag/flag.go +++ b/src/flag/flag.go @@ -981,7 +981,8 @@ func commandLineUsage() { } // NewFlagSet returns a new, empty flag set with the specified name and -// error handling property. +// error handling property. If the name is not empty, it will be printed +// in the default usage message and in error messages. func NewFlagSet(name string, errorHandling ErrorHandling) *FlagSet { f := &FlagSet{ name: name, -- 2.48.1