Open the package file you downloaded and follow the prompts to install Go.
/usr/local/go
./usr/local/go/bin
directory in your PATH
environment variable.Restart your terminal and verify the settings by entering the following commands.
which go
# returns: /usr/local/go/bin/go
echo $PATH
# Make sure PATH contains '/usr/local/go/bin/go'.
go version
# Prints something similar to the following:
# go version go1.16.4 darwin/amd64