You should see an output like go version go1.x.x darwin/arm64 . 2. Installing via Homebrew (The Developer's Choice)
If you already use Homebrew , you can manage Go as a package, which makes updates much simpler. Open your terminal and run: brew install go ``` Use code with caution.
Homebrew usually handles the path configuration automatically, but you can confirm the location by running which go . Updating: When a new version is released, simply run: brew upgrade go Use code with caution. 3. Setting Up Your Environment Variables download go mac
Go to the official Go Download page . Select Your Architecture:
The most common way to install Go is by using the official package installer from the Go website . You should see an output like go version go1
Download the installer labeled macOS ARM64 .
Getting Go (Golang) running on your Mac is a straightforward process, whether you’re using the latest Apple Silicon (M1/M2/M3) or an older Intel-based machine. This guide covers the most efficient ways to download and set up your Go environment. 1. Direct Download (The Official Method) Open your terminal and run: brew install go
Open the downloaded .pkg file and follow the on-screen prompts. By default, it installs Go to /usr/local/go . Verify the Install: Open your Terminal and type: go version Use code with caution.
To ensure your system can find Go and the tools you install with it, you may need to update your shell profile (usually .zshrc for modern macOS or .bash_profile for older versions). Download and install - The Go Programming Language