Delve is a text-based debugger for Go programs written in Go. On macOS Mojave, you can download Delve as follows:
$ go get -u github.com/go-delve/delve/cmd/dlv $ ls -l ~/go/bin/dlv -rwxr-xr-x 1 mtsouk staff 16M Mar 7 09:04 /Users/mtsouk/go/bin/dlv
As Delve depends on a lot of Go modules and packages, the installation process is going to take a while. The Delve binary is installed on ~/go/bin. Executing dlv version will reveal information about its version:
$ ~/go/bin/dlv version Delve Debugger Version: 1.2.0 Build: $Id: 068e2451004e95d0b042e5257e34f0f08ce01466 $
Note that Delve also works on Linux and Microsoft Windows machines. Also note that Delve is an external program, which means that you do not need to include any packages in your Go programs for Delve to work.
As this section is a quick introduction to Delve, the following subsection will...