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

proposal: x/tools/cmd/godoc: should support an "-std" option. #25158

Closed
go101 opened this issue Apr 29, 2018 · 4 comments
Closed

proposal: x/tools/cmd/godoc: should support an "-std" option. #25158

go101 opened this issue Apr 29, 2018 · 4 comments

Comments

@go101
Copy link

go101 commented Apr 29, 2018

There are too many third-party packages in my GOPATH, which makes the godoc -http=:8888 command spend several minutes to start serving. In the starting process, the CPU is so hot and the godoc server consumes a lot of memory. I just want to read the docs of standard pacakges, so the most work is wasted on parsing third-party packages.

So a proposal as the title says to let the godoc server only show docs of standard packages.

@gopherbot gopherbot added this to the Proposal milestone Apr 29, 2018
@go101 go101 changed the title proposal: godoc cmd should sipport an "-std" option. proposal: godoc cmd should support an "-std" option. Apr 29, 2018
@mvdan
Copy link
Member

mvdan commented Apr 29, 2018

This seems possible to me already: GOPATH= godoc [args]

@agnivade
Copy link
Contributor

agnivade commented Apr 29, 2018

Setting a dummy GOPATH like GOPATH=/dummy ./godoc -http=:6060 solves the issue.

EDIT: Our responses crossed. :)

@agnivade agnivade changed the title proposal: godoc cmd should support an "-std" option. proposal: x/tools/cmd/godoc: should support an "-std" option. Apr 29, 2018
@go101
Copy link
Author

go101 commented Apr 29, 2018

looks GOROOT=$HOME/gosdk GOPATH=noexist godoc -http=:9999 work, but GOROOT=$HOME/gosdk GOPATH= godoc -http=:9999 serves weird almost blank pages and still scans 3rd party packages.

@go101
Copy link
Author

go101 commented Apr 29, 2018

close it for the GOROOT=$HOME/gosdk GOPATH=noexist godoc -http=:9999 way.

@go101 go101 closed this as completed Apr 29, 2018
@golang golang locked and limited conversation to collaborators Apr 29, 2019
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