$GOPATH must not be set to $GOROOT

Hello I intalled go today and I get the following error when trying to use go get:
warning: GOPATH set to GOROOT (C:\Go) has no effect
package github.com/gorilla/mux: cannot download, $GOPATH must not be set to $GOROOT. For more details
see: ‘go help gopath’
So I used go env to see what’s going on and it looks like so:
set GOPATH=C:\Go
set GOROOT=C:\Go
The thingis GOPATH is not defined in the system environment variables.
I then set it to another folder and after restarting the pc the GOPATH variable was still set equal to C:\Go
I haven’t found a fix yet can someone help me with this problem?

Here are the directions for installing Go on Windows:

https://golang.org/doc/install#windows

And I found this, which covers many Windows versions, for setting environment variables:

https://www.java.com/en/download/help/path.xml

Did you do that? It may help if you tell people which version of Windows you are using. You didn’t even say you are on Windows.

Seem you didn’t get my Problem, the problem is that gopath is no where to be defined as goroot, that for i can’t change it.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.