-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: doc -http should start a pkgsite instance and open a browser #68106
Comments
Similar Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
I would like know to run |
We could certainly make |
This proposal has been added to the active column of the proposals project |
go doc -http should open the browser (we have other go tools that do that). it would be slick if the browser integration could track reliably whether the last page was closed and have go doc -http exit at that point. |
Have all remaining concerns about this proposal been addressed? The proposal is to add |
Based on the discussion above, this proposal seems like a likely accept. The proposal is to add |
No change in consensus, so accepted. 🎉 The proposal is to add |
Change https://go.dev/cl/628175 mentions this issue: |
The
go doc
command displays documentation to stdout, which is handy for quick forays for a single package or symbol, but for extended reading a browser is more convenient, as it has better typography and linked cross-references. We propose thatgo doc -http
should start a pkgsite instance in the background (if one is not running already) and open a web browser to the correct URL for the package or symbol.The pkgsite program is currently rather large and slow to start as it was designed as a long-lived server for a large corpus on Google Cloud. Issue #61399 tracks the work to slim it down and reduce dependencies.
Open questions:
go doc
processes communicate the port or pid of the running instance, and deal with server crashes?@rsc @matloob
The text was updated successfully, but these errors were encountered: