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/doc: support output of full documentation for a package or identifier #25595

Closed
mpx opened this issue May 27, 2018 · 8 comments
Closed

cmd/doc: support output of full documentation for a package or identifier #25595

mpx opened this issue May 27, 2018 · 8 comments
Labels
FeatureRequest FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@mpx
Copy link
Contributor

mpx commented May 27, 2018

Removal of CLI support in godoc is being considered in #25443. Support for full package documentation is the main reason I continue to use godoc (otherwise I use go doc).

Please consider adding support to output full package documentation in go doc. This would make it much easier to review all the documentation at once to get a proper understanding of a package, as well as arbitrary searches within the full package text.

Perhaps implement a -v flag that outputs full documentation for a package or identifier (similar to godoc).

@meirf
Copy link
Contributor

meirf commented May 27, 2018

Similar to #18807

@agnivade agnivade added NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. FeatureRequest labels May 31, 2018
@agnivade agnivade added this to the Unplanned milestone May 31, 2018
@rsc
Copy link
Contributor

rsc commented Jun 11, 2018

@robpike, any ideas for some flag to 'go doc' to mean 'print everything like godoc does'? The overall idea is that eventually we could deprecate 'godoc' for command-line queries completely.

@rsc
Copy link
Contributor

rsc commented Jun 11, 2018

Maybe go doc -all

@robpike robpike self-assigned this Jun 11, 2018
@robpike
Copy link
Contributor

robpike commented Jun 24, 2018

A "-all" flag sounds good for the next release.

@robpike robpike removed the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Jun 24, 2018
@robpike robpike modified the milestones: Unplanned, Go1.12 Jun 24, 2018
@lukmdo
Copy link

lukmdo commented Aug 2, 2018

go version go1.10.3

go doc already has

-u show unexported symbols as well as exported

@agnivade
Copy link
Contributor

Marking this as release blocker, now that godoc CLI support is removed. Folks will be miffed if we just point them to a go doc which is not feature equivalent with godoc.

This was also raised in a golang-nuts thread, so ensuring this gets looked at.

@agnivade agnivade added NeedsFix The path to resolution is known, but the work has not been done. release-blocker labels Oct 11, 2018
@gopherbot
Copy link

Change https://golang.org/cl/141977 mentions this issue: cmd/doc: add -all flag to print all documentation for package

gopherbot pushed a commit that referenced this issue Oct 17, 2018
Unlike the one for the old godoc, you need the -u flag to see
unexported symbols. This seems like the right behavior: it's
consistent.

For now at least, the argument must be a package, not a symbol.
This is also different from old godoc.

Required a little refactoring but also cleaned up a few things.

Update #25595

Leaving the bug open for now until we tackle
	go doc -all symbol

Change-Id: Ibc1975bfa592cb1e92513eb2e5e9e11e01a60095
Reviewed-on: https://go-review.googlesource.com/c/141977
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
@gopherbot
Copy link

Change https://golang.org/cl/144357 mentions this issue: cmd/doc: allow -all to apply to individual items

@golang golang locked and limited conversation to collaborators Oct 31, 2019
@rsc rsc unassigned robpike Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FeatureRequest FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

7 participants