Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
f3fa0bbd
Commit
f3fa0bbd
authored
Aug 08, 2014
by
Andrew Gerrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flag: mention -h in docs
Fixes #8314. LGTM=r R=r CC=golang-codereviews
https://golang.org/cl/125820043
parent
10c2f56b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/pkg/flag/flag.go
src/pkg/flag/flag.go
+3
-2
No files found.
src/pkg/flag/flag.go
View file @
f3fa0bbd
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment