Reputation: 443
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.
Upvotes: 0
Views: 1722
Reputation: 21
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.
Upvotes: 2
Reputation: 443
I could not find an answer to this question. I've decided to use IntelliJ with the golang plugin and this solution works wonderfully.
Upvotes: 0