Answer the question
In order to leave comments, you need to log in
How to properly set up an IDE to work with golang?
Here is what I have:
- OSX Sierra 10.12.2
- Idea Ultimate 2016.3.3
- go version go1.7.4 darwin/amd64
- Go plugin for Idea (Version 0.13.1924)
Here is what I understood from golang documentation:
- GOROOT = path to go binaries
- GOPATH = path to the project folder, inside which the src folder should be
. I use zsh, the above environment variables have not been added anywhere yet.
Here are the project settings now. I guess there is something to be added here as well.
A question for the experts: what should be written where correctly in order to work painlessly with go?
Answer the question
In order to leave comments, you need to log in
You write the paths to the installed go:
(for example, if go is installed in the $HOME/go folder )
$ export GOROOT=$HOME/go
$ export PATH=$PATH:$GOROOT/bin
$ export GOPATH="$HOME/work"
$ export GOBIN="$GOPATH/bin"
$ mkdir -p $GOPATH/src
$ mkdir $GOBIN
$ go env
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question