我试图在本地为一个模块运行godoc,但是遇到了这个错误。
在我看来,godoc依赖于go list,但不能以模块友好的方式运行go list。
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.)发布于 2020-09-24 00:55:13
试试这个:
GO111MODULE=off godoc看起来这是一个持续存在的问题:https://github.com/golang/go/issues/33655
现在,我已经把这个放到了我的dotfiles中:
alias godoc='GO111MODULE=off godoc'https://stackoverflow.com/questions/62611164
复制相似问题