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

cmd/go: docs should suggest 'go doc command' not 'go tool command -h' #18313

Closed
ALTree opened this issue Dec 14, 2016 · 3 comments
Closed

cmd/go: docs should suggest 'go doc command' not 'go tool command -h' #18313

ALTree opened this issue Dec 14, 2016 · 3 comments
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@ALTree
Copy link
Member

ALTree commented Dec 14, 2016

What version of Go are you using (go version)?

$ gotip version
go version devel +3fb1e0b Tue Dec 13 13:42:41 2016 +0000 linux/amd64

$ gotip tool -h says:

usage: tool [-n] command [args...]

Tool runs the go tool command identified by the arguments.
With no arguments it prints the list of known tools.

The -n flag causes tool to print the command that would be
executed but not execute it.

For more about each tool command, see 'go tool command -h'.

Note the:

For more about each tool command, see 'go tool command -h'.

Not every tool actually supports -h. Two of them complain (and then print some info):

$ gotip tool dist -h
unknown command -h
...
$ gotip tool pack -h
pack: not enough arguments
...
@bradfitz bradfitz added this to the Go1.9Maybe milestone Dec 14, 2016
@bradfitz bradfitz added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Dec 14, 2016
@rsc
Copy link
Contributor

rsc commented Jun 12, 2017

Instead of 'go tool command -h' the message should suggest 'go doc command' (like go doc pack or go doc dist; the latter is empty but that's a separate problem).

@rsc rsc changed the title cmd/go: not every tool accept an -h flag cmd/go: docs should suggest 'go doc command' not 'go tool command -h' Jun 12, 2017
@rsc rsc added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. labels Jun 12, 2017
@rsc rsc modified the milestones: Go1.10, Go1.9Maybe Jun 12, 2017
@gopherbot
Copy link

Change https://golang.org/cl/54351 mentions this issue: cmd/dist: add doc file to fix go doc dist

gopherbot pushed a commit that referenced this issue Aug 11, 2017
$ go tool -h says:

  For more about each tool command, see 'go tool command -h'.

but it was suggested to change the suggestion to say:

  see 'go doc command'

In #18313.

That would work for every tool except dist, which has no doc.go.

This change adds a doc.go file to cmd/dist.

Updates #18313

Change-Id: If67a21934b87647a69359d9c14d8de3775c587b7
Reviewed-on: https://go-review.googlesource.com/54351
Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@gopherbot
Copy link

Change https://golang.org/cl/55990 mentions this issue: cmd/go: make go tool suggest 'go doc cmd/<tool>'

@golang golang locked and limited conversation to collaborators Aug 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants