Install Go
brew install go
Add it to your Path
Add the following to your .bashrc or zshrc file
export PATH="$PATH:$(go env GOPATH)/bin"
Install Go Plugin
In IntelliJ, click Preferences, Plugins and search for Go. Click Install.
Set Go Path and add go support to your module.