Go Language Settings

0

I need to do a college job and chose to do it in the Go language because I wanted to learn a new language. Yesterday I installed the .msi of the site and saw that I needed to configure the variables GOPATH , PATH and GOROOT . I configured them as follows:

  • GOPATH = C:\Users\Gustavo\goprojects (where the goprojects folder I created and that's where I want all my Go language projects to stay)
  • GOROOT = C:\Go\ (folder where Go has been installed)
  • PATH = C:\Users\Gustavo\goprojects\bin

So far so good. But I use the Eclipse IDE and researching I have seen that it has a plugin called GoClipse that makes Eclipse be an IDE of the Go language, so I installed it through Eclipse's own marketplace.

After all this has been done, I created a new Go project and put the project in the C:\Users\Gustavo\goprojects path, and created a new .go inside a folder that is inside the src folder. When I was writing a Hello World, every time I tried to make it complete the code alone it appears an error I went to see and saw that I needed to download another plugin to work auto-completing , and this plugin calls gocode which is a project that is in GitHub.

And here's my problem. Where and how should I download this folder and how to activate it in my Eclipse? Did I set the variables correctly? Do I need to do anything else?

Q.: I use Windows 8.1, I have git installed.

    
asked by anonymous 30.09.2015 / 23:25

3 answers

2

Assuming the gocode project you refer to is this: link , just run the command:

go get -u github.com/nsf/gocode

This will cause the package to be properly installed and its binary available in the $GOPATH\bin folder.

    
17.12.2015 / 14:12
0

I'm programming in GO, I advise a lot to focus on this language .. and a suggestion since I'm programmer for many years .. It uses Linux to program in GO, it can be a VirtualBox and I like to use ATOM, it has several interesting plugins.

    
11.06.2017 / 04:37
0

Regardless of any project you use, I recommend using the Go workspaces recommendation. At documentation they explain how you should create these workspaces.

With this you can make your projects very well structured, and standardized.

    
14.07.2017 / 22:40