]> Cypherpunks repositories - gostls13.git/commitdiff
flag: mention -h in docs
authorAndrew Gerrand <adg@golang.org>
Thu, 7 Aug 2014 22:57:18 +0000 (08:57 +1000)
committerAndrew Gerrand <adg@golang.org>
Thu, 7 Aug 2014 22:57:18 +0000 (08:57 +1000)
Fixes #8314.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/125820043

src/pkg/flag/flag.go

index fa7760550cd0a650b662a3b10adf82ee330a47b4..de2d91f8b1b12c5e154dab12718f8e7b599f23d7 100644 (file)
@@ -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