aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Gerrand <adg@golang.org>2014-08-08 08:57:18 +1000
committerAndrew Gerrand <adg@golang.org>2014-08-08 08:57:18 +1000
commitf3fa0bbd1f011c7436f21a18ee08f719a15b02b8 (patch)
treed8cfb9d4521aeec645e81e663804af58620d7d18 /src
parent10c2f56bf968884db3883a0c0b2a20f964a0ad4c (diff)
downloadgo-f3fa0bbd1f011c7436f21a18ee08f719a15b02b8.tar.xz
flag: mention -h in docs
Fixes #8314. LGTM=r R=r CC=golang-codereviews https://golang.org/cl/125820043
Diffstat (limited to 'src')
-rw-r--r--src/pkg/flag/flag.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pkg/flag/flag.go b/src/pkg/flag/flag.go
index fa7760550c..de2d91f8b1 100644
--- a/src/pkg/flag/flag.go
+++ b/src/pkg/flag/flag.go
@@ -73,7 +73,8 @@ import (
"time"
)
-// ErrHelp is the error returned if the flag -help is invoked but no such flag is defined.
+// ErrHelp is the error returned if the -help or -h flag is invoked
+// but no such flag is defined.
var ErrHelp = errors.New("flag: help requested")
// -- bool Value
@@ -788,7 +789,7 @@ func (f *FlagSet) parseOne() (bool, error) {
// Parse parses flag definitions from the argument list, which should not
// include the command name. Must be called after all flags in the FlagSet
// are defined and before flags are accessed by the program.
-// The return value will be ErrHelp if -help was set but not defined.
+// The return value will be ErrHelp if -help or -h were set but not defined.
func (f *FlagSet) Parse(arguments []string) error {
f.parsed = true
f.args = arguments