有谁知道为什么我无法运行go-getting-started应用程序localy?
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 .
答案 0 :(得分:1)
如果您看到有关无法识别的命令或“未找到命令”的错误,那么$ GOPATH / bin可能不在您的$ PATH中,或者在go中失踪了... ...获取github.com/heroku/go -getting-started / ....在“准备应用程序”期间使用的命令。
确保$GOPATH/bin
变量中C:\Users\XXXX\gocode\bin
(在您的情况下为$PATH
)。服务器二进制文件go-getting-started
已经存在,您只需要将其提供给命令行。