Use 'go help ' for more information about that topic. Module-private module configuration for non-public modules Module-auth module authentication using go.sum Modules modules, module versions, and more Use 'go help ' for more information about a command. Install compile and install packages and dependencies Get download and install packages and dependencies Generate generate Go files by processing source Go is a tool for managing Go source code.Ĭlean remove object files and cached filesĭoc show documentation for package or symbol GOTOOLDIR='/usr/local/go/pkg/tool/darwin_amd64' GOENV='/Users/user/Library/Application Support/go/env' GOCACHE='/Users/user/Library/Caches/go-build' $ grep -q '^export GOBIN=$GOPATH/bin' ~/.zshrc || echo 'export GOBIN=$GOPATH/bin' > ~/.zshrcĮxport GOBIN=$GOPATH/bin Open a new terminal window and check GOPATH and GOBIN $ go version $ grep -q '^export GOPATH=~/go' ~/.zshrc || echo 'export GOPATH=~/go' > ~/.zshrc Also see: $ grep -q '^export PATH=/usr/local/go/bin:$PATH' ~/.zshrc || echo 'export PATH=/usr/local/go/bin:$PATH' > ~/.zshrc Setting GOPATH and GOBINĪdd /usr/local/go/bin to ~/.zshrc or ~/.bashrc. Go version go1.15.6 darwin/amd64 Install Go Tools Download pkg and install by opening pkg file and following installation process.Īlso see: Installing multiple Go versions $ /usr/local/go/bin/go version