Home  >  Article  >  Backend Development  >  Where are Go Packages Installed by "go get" Located When Using Homebrew?

Where are Go Packages Installed by "go get" Located When Using Homebrew?

Linda Hamilton
Linda HamiltonOriginal
2024-11-16 06:39:03977browse

Where are Go Packages Installed by

Locating Packages Installed by "go get"

When using "go get " to install a remote Git repository, it's not immediately apparent where the resulting package is stored. By default, "go get" installs packages into the $GOPATH/bin directory. However, if $GOPATH is not explicitly set in your shell, it's possible to run into confusion.

Homebrew Installation

For Homebrew installations of Go, the default $GOPATH is not set, but the "go get" command still works successfully. To determine the location of the installed package, run the following command:

brew info go

This command will provide additional information about your Go installation, including a note indicating that if $GOPATH is not specified, $HOME/go will be used instead.

Therefore, for Homebrew installations, the default location for packages installed by "go get" is:

$HOME/go/bin

By navigating to this directory, you should find the executable associated with the installed package.

The above is the detailed content of Where are Go Packages Installed by "go get" Located When Using Homebrew?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn