0

I've decided to use Eclipse (with the goClipse plugin) as my editor for go projects. I already had go installed and (before choosing Eclipse) I had designated c:\go-workspace as my workspace.

I now want to configure Eclipse to use that workspace as my location for go work. I plan to import various projects from github and create my own github account where I can commit changes, etc. All those imports will be under the src/directory, and this is in accordance with this article that seems to indicate it is best to have one go workspace with everything under the src/ directory: https://talks.golang.org/2014/organizeio.slide#9.

I'm having issues creating a go project in Eclipse. I choose File > New Go Project and browse to c:\go-workspace. I enter a project name in the dialog but I get a message saying that a directory already exists at the specified location and my only choice is to cancel.

I then tried creating a new Eclipse workspace but when Eclipse was finished it indicated it is a Java project.

How do I accomplish what I want to do? Or perhaps the "best practice" for what I want to do is something else.

Steve Murphy
  • 431
  • 2
  • 7
  • 17

2 Answers2

2

Ok, you already decided to go for IntelliJ but maybe someone else might be interested in an answer though ...

I also had some fights with GoClipse but finally I got it working. The solution is to input the whole path (including the project name). So for example your GOPATH is (on Linux) /home/username/go and you want to create a project named "gopro" and want to place it in "/home/username/go/src/github.com/user" you need to type in the Eclipse window: "/home/username/go/src/github.com/user/gopro". Everything should work without any problems afterwards.

Khedr0n
  • 21
  • 2
0

I could not find an answer to this question. I've decided to use IntelliJ with the golang plugin and this solution works wonderfully.

Steve Murphy
  • 431
  • 2
  • 7
  • 17
  • We tried IntelliJ before switching to Visual Studio Code with the go plugin, maybe you can give it a try and answer which one you like more. Our experience using Visual Studio Code is that it works really good while IntelliJ had a lot of problem some months ago. – ventayol Jan 20 '17 at 05:49
  • Thanks, ventayol. I'll give that a try. – Steve Murphy Jan 20 '17 at 13:58