diff options
author | Ian Lance Taylor <iant@golang.org> | 2018-03-28 07:44:06 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2018-03-28 20:56:03 +0000 |
commit | 70afd51ec53095727989f64365fb342082f06832 (patch) | |
tree | 9a5b1eec83587406b412cf7b4a81c14844fcf71e /src/flag | |
parent | ad638fbfb5acf1e9ced976067961e5e62360484a (diff) | |
download | go-70afd51ec53095727989f64365fb342082f06832.tar.gz go-70afd51ec53095727989f64365fb342082f06832.zip |
flag: document use of FlagSet name parameter
Fixes #24225
Change-Id: I876ac1b9d3615283f7b88cfa0b965ef81a57f056
Reviewed-on: https://go-review.googlesource.com/102955
Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src/flag')
-rw-r--r-- | src/flag/flag.go | 3 |
1 files changed, 2 insertions, 1 deletions
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, |