I installed Goland as a Go IDE and it wants me to configure GOPATH. I'm new in this language so I don't know what to do. Here is the error message:
GOPATH was detected We've detected some libraries from your GOPATH. You may want to add extra libraries in GOPATH configuration.
Edit: Not a duplicate question, export GOROOT=""
solved my problem. Thanks anyway.
export GOROOT=""
solved the issue for some reason.
You need to set the GOPATH
environment variable. How you do this varies depending on your operating system.
Here are examples of how to set the PATH environment variable, just modify the instructions to set GOPATH
instead.
Also see How to Write Go Code for more details on setting up your workspace and setting GOPATH
.
You actually do not need to set the GOPATH
environment variable; in Go 1.8 it's ~/go
by default.
I suggest that you just update to latest stable Go (1.8) and use that convention; otherwise you'll need to set the GOPATH
variable in your environment.