如何为Google App Engine Go开发设置IntelliJ IDEA?

我想使用IntelliJ IDEA IDE来开发GAE Golang应用程序。 我知道我需要下载该程序和 Golang插件</ a >,但除此之外,我迷路了。 是否有关于如何为GAE Go开发配置IDEA的教程?</ p>

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

展开原文

原文

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个回答

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.

enter image description here

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.

enter image description here

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐