How do I run godoc locally for a module?

Viewed 1069

I'm trying to run godoc locally for a module but running into this error.

It looks to me like godoc relies on go list, but doesn't run go list in a module friendly manner.

ak/ (master)  godoc -http=localhost:6060
using module mode; GOMOD=/Users/aaron/ak/go.mod
failed to determine the build list of the main module: go command exited unsuccessfully: exit status 1
go list -m: can't compute 'all' using the vendor directory
    (Use -mod=mod or -mod=readonly to bypass.)
1 Answers
Related