Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flag, cmd/fix: fix documentation issues #8314

Closed
gopherbot opened this issue Jul 2, 2014 · 5 comments
Closed

flag, cmd/fix: fix documentation issues #8314

gopherbot opened this issue Jul 2, 2014 · 5 comments
Milestone

Comments

@gopherbot
Copy link

by fgergo:

What does 'go version' print?
go version go1.3 linux/arm

(I am not sure whether I should report 2 smaller issues the next time.)

2 minor issues:
1. in pkg/flag:
-h is missing from the comments and because of this from the documentation:

To fix:
http://golang.org/src/pkg/flag/flag.go?s=#L76
"ErrHelp is the error returned if the flag -help is invoked but no such flag is
defined."
change to:
"ErrHelp is the error returned if the flag -help or -h is invoked but no such flag
is defined."

http://golang.org/src/pkg/flag/flag.go?s=#L787
"The return value will be ErrHelp if -help was set but not defined."
change to:
"The return value will be ErrHelp if -help or -h was set but not defined."

2. on http://golang.org/cmd/fix/
"Fix prints the full list of fixes it can apply in its help output; to see them,
run go tool fix -?"
go tool fix -? prints an additional error message in the first line. I think the
intended version was either:
"Fix prints the full list of fixes it can apply in its help output; to see them,
run go tool fix -help"

or if -? was intended, then pkg/flag needs to be changed to accomodate for -?:
i.) add ? to the list  special cases here:
http://golang.org/src/pkg/flag/flag.go?s=#L749
ii.) http://golang.org/src/pkg/flag/flag.go?s=#L76
"ErrHelp is the error returned if the flag -help is invoked but no such flag is
defined."
change to:
"ErrHelp is the error returned if the flag -help or -h or -? is invoked but no such
flag is defined."
iii.) http://golang.org/src/pkg/flag/flag.go?s=#L787
"The return value will be ErrHelp if -help was set but not defined."
change to:
"The return value will be ErrHelp if -help or -h or -? was set but not
defined."
@ianlancetaylor
Copy link
Contributor

Comment 1:

Labels changed: added repo-main, release-go1.4.

@adg
Copy link
Contributor

adg commented Aug 7, 2014

Comment 2:

Owner changed to @adg.

Status changed to Started.

@adg
Copy link
Contributor

adg commented Aug 7, 2014

Comment 3:

This issue was updated by revision fad69a7.

TBR=r
R=golang-codereviews
CC=golang-codereviews
https://golang.org/cl/123890043

@gopherbot
Copy link
Author

Comment 4:

CL https://golang.org/cl/125820043 mentions this issue.

@adg
Copy link
Contributor

adg commented Aug 7, 2014

Comment 5:

This issue was closed by revision f3fa0bb.

Status changed to Fixed.

@rsc rsc added this to the Go1.4 milestone Apr 14, 2015
@rsc rsc removed the release-go1.4 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 25, 2018
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 9, 2018
@rsc rsc unassigned adg Jun 23, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants