B5I5
B5I5

Reputation: 23

i having trouble with GOPATH and Intellij idea

I use MACOSX 10.10.5 and use Intellij IDEA as IDE.

I already install GO SDK (by download SDK from website and not from Macports)and try simple program, it work correctly.

I try to use gorilla library (http://www.gorillatoolkit.org/pkg/mux#overview), So I set GOPATH like this

and Add PATH to intellij, see figure below. Set gorilla library

When i import this library IDE throw error like this.enter image description here

So i try to fixit like this I use IntelliJ IDEA as golang IDE, and system environment have already set GOPATH,But IDEA can't load it

But it do not work for me. how can I set GOPATH in idea?

Upvotes: 0

Views: 1379

Answers (2)

Alexander Zolotov
Alexander Zolotov

Reputation: 714

The question you mentioned is about old version of plugin. For the new version GOPATH is defined in Settings | Languages & Frameworks | Go | Go Libraries. There you also can see whether GOPATH system environment variable was found or not and add your custom GOPATHs.

See also documentation

Upvotes: 1

Chris Jacobs
Chris Jacobs

Reputation: 81

Here you can see the menu path:

Languages & Frameworks > Go > Go SDK

I'm using brew, so it's /usr/local/Cellar/go/1.5.1/libexec currently.

Upvotes: 0

Related Questions