在Gogland上调用GAE/Go本地开发服务器

huangapple go评论73阅读模式
英文:

Invoking GAE/Go Local Development Server on Gogland

问题

如何在Gogland上调用GAE/Go本地开发服务器?

在“运行/调试配置”窗口中,我收到了“未指定Go SDK”的警告,但我找不到如何设置Go SDK。

即使我按下了“确定”按钮,并通过“运行”->“运行'Unnamed'”来调用,我仍然收到了以下错误信息。

"C:\Program Files (x86)\JetBrains\Gogland 171.3780.106\bin\runnerw.exe" C:/Go\bin\go.exe serve C:/path/to/app.yaml
go: unknown subcommand "serve"
Run 'go help' for usage.

进程以退出代码2结束

我该如何修复?

在Gogland上调用GAE/Go本地开发服务器

英文:

How can I invoke GAE/Go local development server on Gogland?

In Run/Debug Configuration window, I have the warning "Go SDK is not specified", but I can't find how I can set Go SDK.

在Gogland上调用GAE/Go本地开发服务器

Even then I pressed OK, and invoked with Run -> Run 'Unnamed', I got this error.

"C:\Program Files (x86)\JetBrains\Gogland 171.3780.106\bin\runnerw.exe" C:/Go\bin\go.exe serve C:/path/to/app.yaml
go: unknown subcommand "serve"
Run 'go help' for usage.

Process finished with exit code 2

在Gogland上调用GAE/Go本地开发服务器

How can I fix?

答案1

得分: 2

错误的原因是使用常规的Go发行版作为SDKGOROOT)。

要运行GAE Go应用程序,您需要使用GAE Go SDK作为GOROOT。可以通过设置文件 | 设置 | Go | GOROOT来更改GOROOT

英文:

The reason of the error is that a regular Go distribution is used as an SDK (GOROOT).

To run GAE Go application you need to use GAE Go SDK as a GOROOT. Changing GOROOT is available via settings File | Setting | Go | GOROOT

huangapple
  • 本文由 发表于 2017年4月6日 08:41:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/43243820.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定