From: Andrew Gerrand Date: Thu, 7 Aug 2014 22:57:18 +0000 (+1000) Subject: flag: mention -h in docs X-Git-Tag: go1.4beta1~876 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f3fa0bbd1f011c7436f21a18ee08f719a15b02b8;p=gostls13.git flag: mention -h in docs Fixes #8314. LGTM=r R=r CC=golang-codereviews https://golang.org/cl/125820043 --- 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