Install Golang on a Raspberry Pi

Get the latest version from then download the arm based archive:

$ wget

Then extract to path:

$ sudo tar -C /usr/local -xzf go1.13.7.linux-armv6l.tar.gz

Set your PATH variable:

$ export PATH=$PATH:/usr/local/go/bin

And also set it to the /etc/profile.d/ directory so that its persisted after logins:

$ sudo -H -u root bash -c "echo 'export PATH=\$PATH:/usr/local/go/bin' > /etc/profile.d/"

Verify that go is working:

$ go version
go version go1.13.7 linux/arm  

Remove the archive:

$ rm -rf go1.13.7.linux-armv6l.tar.gz