godoc, the local web server that displays documentation for Go packages (not to be confused with
https://godoc.org, the website), has been updated with support for Go modules. (This was
issue 33655.)
Module-aware mode is enabled whenever it would be enabled for the
go command. That is, module mode is enabled when a
go.mod file is found in, or in a parent of, the directory where you run the
godoc command. Documentation is displayed for packages in the
build list, which includes the main module and its dependencies.
Environment variables such as
GO111MODULE,
GOPRIVATE,
GOPROXY that control the behavior of the
go command also affect
godoc.
If you run into unexpected problems, please let us know by leaving a comment on
issue 33655, filing a
new issue, or replying to this thread.