如何在 Heroku 上提供 godoc 命令
how to serve godoc command on Heroku
我正在尝试在 Heroku 服务器上提供 godoc -http=:[port]
我在 Heroku 日志中收到以下错误
bash: godoc: command not found
我的 Procfile 看起来像:
web: godoc -http=:$PORT
我尝试通过将以下行添加到 Procfile 来安装 godoc
release: go get -u golang.org/x/tools/cmd/godoc
注意:我正在使用 Go 模块
因为我正在使用 go modules,所以我将以下行添加到我的 go.mod 文件中以安装 godoc 工具
// +heroku install golang.org/x/tools/cmd/godoc
我正在尝试在 Heroku 服务器上提供 godoc -http=:[port]
我在 Heroku 日志中收到以下错误
bash: godoc: command not found
我的 Procfile 看起来像:
web: godoc -http=:$PORT
我尝试通过将以下行添加到 Procfile 来安装 godoc
release: go get -u golang.org/x/tools/cmd/godoc
注意:我正在使用 Go 模块
因为我正在使用 go modules,所以我将以下行添加到我的 go.mod 文件中以安装 godoc 工具
// +heroku install golang.org/x/tools/cmd/godoc