Home > Article > Backend Development > Where do Go packages installed with `go get` reside?
Determining the Installation Location of Packages Obtained via Go Get
Question:
When using the go get command to install packages from remote Git repositories, it's not immediately clear where the package is installed. This question poses the issue, particularly in the absence of a defined GOPATH environment variable.
Answer:
To determine the installation location, consult the Homebrew formula for Go using the brew info go command. According to the information provided by the formula, a valid GOPATH is necessary for go get. If GOPATH is not explicitly defined, it defaults to $HOME/go.
To locate the executable installed by go get, navigate to the $HOME/go/bin directory. This is where the executable should be located.
The above is the detailed content of Where do Go packages installed with `go get` reside?. For more information, please follow other related articles on the PHP Chinese website!