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

x/tools/cmd/godoc: better output when running with GOMOD=/dev/null #35476

Closed
dmitshur opened this issue Nov 9, 2019 · 1 comment
Closed

x/tools/cmd/godoc: better output when running with GOMOD=/dev/null #35476

dmitshur opened this issue Nov 9, 2019 · 1 comment
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@dmitshur
Copy link
Contributor

dmitshur commented Nov 9, 2019

When running godoc in module mode while outside of any module (i.e., where go env GOMOD reports /dev/null), godoc displays only the Go packages that are available in the standard library, which is expected per design in #33655 (comment).

However, the current output isn't very user friendly:

$ GO111MODULE=on godoc
using module mode; GOMOD=/dev/null
go mod download: no modules specified (see 'go help mod download')
documentation for some packages is not shown:

It can be improved by detecting when the GOMOD value is /dev/null and treating it differently than other paths. Specifically, there isn't a need to try to fill the module cache in that case.

/cc @bcmills @jayconrod FYI, and please let me know if you notice that I'm overlooking something.

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. modules Tools This label describes issues relating to any tools in the x/tools repository. labels Nov 9, 2019
@dmitshur dmitshur self-assigned this Nov 9, 2019
@gopherbot gopherbot added this to the Unreleased milestone Nov 9, 2019
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/206886 mentions this issue: cmd/godoc: don't execute go mod download when GOMOD=/dev/null

@golang golang locked and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

2 participants