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

Linda Hamilton
Release: 2024-11-16 06:39:03
Original
983 people have browsed it

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
Copy after login

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
Copy after login

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!

source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template