Download ARM Version
wget https://storage.googleapis.com/golang/go1.9.1.linux-armv6l.tar.gz
Extract
sudo tar -C /usr/local -xzf go1.9.1.linux-armv6l.tar.gz
Create GOPATH directory
mkdir -p /home/pi/workspace/go
Export Env Variables
Edit your bashrc:
sudo vim ~/.bashrc
Add vars:
export GOPATH=/home/pi/workspace/go
export GOROOT=/usr/local/go
export PATH=$PATH:$GOPATH/bin:$GOROOT/bin
Reload bash
. ~/.bashrc
Test
go version
Output:
go version go1.9.1 linux/arm
Clean up
rm go1.9.1.linux-armv6l.tar.gz