Configure project SDK for Go.
Right click main.go -> Select debug
I'm using IntelliJ 15 on OS X. Not certain it's as easy on all platforms.