Installing Go (macOS)

By Engineering Team•October 11, 2026•2 min read

This page covers only the Go toolchain install itself — getting a working go binary on a Mac. It has nothing specific to this monorepo’s services; for how a real service here is actually built and run locally, see that service’s own CLAUDE.md (each Go service has its own src/go.work overriding shared-library paths for local development — see the central coding-pattern rules for the full convention).

1. Install via Homebrew

brew install go

2. Verify the install

go version

This should print the installed Go version (e.g. go version go1.26.2 darwin/arm64).

3. Confirm your Go environment paths

Go installs its workspace under $HOME/go by default. Confirm GOPATH and the Go bin directory are on your PATH:

go env GOPATH

If $(go env GOPATH)/bin isn’t already on your shell’s PATH, add it to your shell profile (~/.zshrc on a modern Mac):

export PATH="$PATH:$(go env GOPATH)/bin"

Reload your shell config:

source ~/.zshrc

Troubleshooting: Clearing Go’s Module/Build Cache

If a dependency upgrade or a go.work change leaves go build/go test behaving as if it’s still using stale package data, clear Go’s caches before digging further:

go clean -modcache   # wipes the downloaded-module cache ($GOPATH/pkg/mod)
go clean -cache       # wipes the build cache ($GOPATH/pkg/mod/cache)
go mod tidy           # re-resolves go.mod/go.sum against what the code actually imports

go clean -modcache forces every module to be re-downloaded on the next build, so expect the first build afterward to be slower.