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

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.

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