After a little of back and forth and using different IDEs I documented my preferred set up here:
Install Golang
Install the latest version of Golang from here.
IDE
I chose to use Visual Studio Code because it is free and it has better support for Golang than (almost) any other IDE outide.
Extension
In order to configure VS Code to support Golang, you need to install vscode-go extension. Then:
- Open VS Code,
- Hold cmd+shift+p,
- Select Install/Update Tools
This will install the following packages:
- gocode
- gopkgs
- go-outline
- go-symbols
- guru
- gorename
- gomodifytags
- impl
- godef
- godoc
- goreturns
- golint
- gotests
Debugging
You can debug Golang code right within VS Code but first you need to install and configure Delve:
- Install Delve: https://github.com/derekparker/delve
- Configure vscode: https://github.com/Microsoft/vscode-go/wiki/Debugging-Go-code-using-VS-Code
Update Nov 2020
If you are using Windows for development, you can upgrade to WSL2, and use the remote development feature of VSCode. In this way, you can code in windows but debug, build, and run on Linux.