Compile a Go Executable for Raspberry Pi

Run the following command, in the root of your Go project, to compile an executable for the Raspberry Pi:

$ env GOOS=linux GOARCH=arm GOARM=7 go build