Heroku go-getting-started 不在本地运行

标签 heroku go

有谁知道为什么我无法在本地运行 go-getting-started 应用程序?

go get github.com/heroku/go-getting-started/cmd/...
cd $env:GOPATH/src/github.com/heroku/go-getting-started

PS C:\Users\XXXX\gocode\src\github.com\heroku\go-getting-started> heroku  local
[OKAY] Loaded ENV .env File as KEY=VALUE Format
[OKAY] Trimming display Output to 107 Columns
11:28:05 PM web.1 |  'go-getting-started' is not recognized as an internal or external command,
11:28:05 PM web.1 |  operable program or batch file.
[DONE] Killing all processes with signal  null
11:28:05 PM web.1 Exited Abnormally
PS C:\Users\XXXX\gocode\src\github.com\heroku\go-getting-started> code .

最佳答案

根据Heroku Dev Center :

If you see an error about an unrecognized command or “command not found”, then $GOPATH/bin is likely not in your $PATH or the trailing ... was missing from the go get github.com/heroku/go-getting-started/.... command used during “Prepare the App”.

确保 $GOPATH/bin(在你的例子中,C:\Users\XXXX\gocode\bin)在你的 $PATH 中> 变量。服务器二进制文件 go-getting-started 已经存在,您只需将其提供给命令行即可。

关于Heroku go-getting-started 不在本地运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36730686/

相关文章:

go - 不在控制台上打印接收 channel 值

go - 开发多模块 Go 工作区的问题

heroku - Heroku 计费的最短时间是多少?

ruby - 在单个 Heroku dyno 上运行多个进程

heroku - 免费的heroku dyno 有最低 sleep 时间限制吗?

go - 接口(interface)和类型的问题

timestamp - 在 Go 中获取当前时间作为格式化字符串?

pointers - 从 Go 中的数组返回指针数组

Django 管理静态文件在带有 Whitenoise 的 Heroku 上不起作用

从非 master 进行 Heroku-Github Auto Deploy(仅看到 master 分支)