Go files ROOT directory settings

Hi, I’m in a little project of making and IDE for Go language and was reading the documentation about go in the section of downloading as .zip, so I didn’t understand the information explaining the root directory settings (for another one different to C:\Go)

You’ll make your life easier by just keeping Go in its default installation directory C:\Go and not worrying about GOROOT.

You will however need to set GOPATH to a place where you keep your source, for example C:\Projects (GOPATH=C:\Projects). You’ll then have your package foo in C:\Projects\src\foo, and go get github.com/user/pkgname will install that package into C:\Projects\src\github.com\user\pkgname.

1 Like

So, where I’ll make that configuration ?

I’m not on Windows myself, but Download and install - The Go Programming Language says:

Setting environment variables under Windows

Under Windows, you may set environment variables through the “Environment Variables” button on the “Advanced” tab of the “System” control panel. Some versions of Windows provide this control panel through the “Advanced System Settings” option inside the “System” control panel.

Ohhh thanks :smile:

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