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

dmitshur opened this issue Nov 9, 2019 · 1 comment


Copy link

@dmitshur 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 self-assigned this Nov 9, 2019
@gopherbot gopherbot added this to the Unreleased milestone Nov 9, 2019

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 13, 2019

Change mentions this issue: cmd/godoc: don't execute go mod download when GOMOD=/dev/null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.