跳到主要内容

1 篇博文 含有标签「Golang」

查看所有标签

· 6 分钟阅读
CheverJohn

GOROOT

The environment variable GOROOT indicates the Go language installation directory.

In windows, the default value of GOROOT is C:/go, while in macOS or Linux, the default value of GOROOT is usr/local/go. If you install Go in another directory, you need to change the value of GOROOT to the corresponding directory.

In addition, GOROOT/bin contains the toolchain that Go provides for us, so you should configure GOROOT/bin to the environment variable PATH so that we can use the Go toolchain globally.