Golang on eclipse: “The resource does not have a matching Go package” on Mac

As indicated in the header, I have a problem with the Golang code on Eclipse. I am currently using a Mac and I installed it using homebrew.

Currently, the folder where go is installed is as follows.

/usr/local/Cellar/go/1.5.2/..

and after launching the terminal and input, open ~/.bash_profileI added the following.

export GOROOT="/usr/local/Cellar/go/1.5.2/"
export PATH=$PATH:$GOROOT/bin

Did I miss something else?

PS If I run the code using Terminal, for example go run main.go, I have absolutely no problem. The problem should be due to some incorrect configuration in Eclipse.

+4
source share
4 answers

. src .

+6

" " → " Go" → "", "" GOPATH. "", "".

+4

.
GoClipse $project/bin, GOPATH = $project

> Alt + Enter > Go > a > Eclipse GOPATH

wiki- GOPATH = :/home/sovann/go/wiki.
IDE /home/sovann/go/wiki/bin/main

0

, :

  • , "Go" ( "Go Application" ). " " ​​ : GOPATH = [ ].
  • .go src, . src .go .

"" . , , .

0

Source: https://habr.com/ru/post/1624176/


All Articles