brew install go
Create a new project with the following command and answer any questions that are prompted:
go mod init
Install dependencies by calling the go get command. For example, if you need to install the viper library, run:
go get github.com/spf13/viper