I was attempting to use intellij's golang plugin, but it sais there is no GOPATH defined.
In my case, I simply want to use a GOPATH.
Screenshot attached: The primary question here: How and where should I set GOPATH when using intellij's Golang plugin?
Some context: I don't mind setting gopath globally on my mac, but it seems that is a heavy-handed approach for an IDE to use**
the Go plugin currently uses the term Go Libraries for different GOPATH values. If you have a single GOPATH that you'd like to use for all the projects, then you can add it to the "Global Libraries". For example, my $GOPATH is /home/florin/golang and in the plugin I've set the Global Libraries from the Go Libraries setting to reflect that (see this screenshot).
If the plugin can automatically detect the GOPATH, and you have the check box ticked for that, then the plugin will try and use that value as the GOPATH value, see the next screenshot
Also, the plugin has three different types of GOPATH values right now:
There's a ticket that plans to simplify this further and your input will be included.
Hope it helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.