go: cannot find GOROOT directory: C:\Go; C:\Go\bin

go

Solution

`GOROOT` should be set to `d:/programs/go` if you installed it there. `GOPATH` should be set to `d:/workspace/gopath` if you want it there. Also, `d:\programs\go\bin` should preferably be added to PATH.

It seems like Go only accepts slash (/) and not backslash (\). But of course, for PATH, it should be backslash (\).

Problem

As title, I just install Go package in my laptop. OS:Windows 7 Enterpreise SP1 (64bit) Install path: `C:\go` I've set "Environment Variables": ``` GOROOT Value = C:\GO;C:GO\bin ``` I made hello.go file and save it in `C:\go` When I run `"go run hello.go" in CMD in C:\`, get error message as below: ``` go:cannot find cannot find GOROOT directory: C:\Go; C:\Go\bin ```

Original source