How to setup IntelliJ IDEA for Google App Engine Go development?

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

How to setup IntelliJ IDEA for Google App Engine Go development?

问题

我想使用IntelliJ IDEA IDE来开发GAE Golang应用程序。我知道我需要下载该程序和Golang插件,但除此之外我一无所知。是否有关于如何配置IDEA进行GAE Go开发的教程可用?

我已经在GOPATH/src/...文件夹中设置了我的项目,App Engine SDK已配置,我可以使用goapp命令行运行我的项目。然而,我希望能够设置一个IDE进行语法检查,并能够从IDE中运行和调试应用程序,而不是使用控制台。

英文:

I want to use IntelliJ IDEA IDE for developing GAE Golang apps. I know I need to download the program and the Golang plugin, but beyond that I am lost. Is there a tutorial available on how to configure IDEA for GAE Go development?

I have my project set up in GOPATH/src/... folder, App Engine SDK is configured and I can run my project from command line using goapp. However, I would like to be able to setup an IDE for syntax checking and be able to run and debug the app from the IDE, rather than resort to using the console.

答案1

得分: 10

在左侧窗格中右键单击项目,然后选择“打开模块设置”。从那里开始:

  • 转到项目设置 -> 项目
  • 新建 SDK -> 选择 appengine sdk 的 goroot 目录路径
  • 应用并且你应该可以获得标准 go appengine 相关的自动完成。

如果你还想要通过使用 goapp get XXX 下载的包进行自动完成,转到“平台设置 -> SDKs”并在那里添加适当的路径。它应该在 gopath 的某个位置。

英文:

Right click your project in the left pane and select 'Open Module Settings'. From there:

  • go to Project Settings -> Project
  • New SDK -> select the path to the goroot directory of the appengine sdk
  • Apply and you should have completion for the standard go appengine stuff.

How to setup IntelliJ IDEA for Google App Engine Go development?

If you also want completion for packages that you download using goapp get XXX, go to 'Platform Settings -> SDKs' and add the appropriate path there. It should be somewhere under gopath.

How to setup IntelliJ IDEA for Google App Engine Go development?

huangapple
  • 本文由 发表于 2014年5月21日 13:43:37
  • 转载请务必保留本文链接:https://go.coder-hub.com/23774886.html
匿名

发表评论

匿名网友

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

确定