How to Install Go on a VM Virtual Box running Ubuntu under Windows
OK. I know you love Windows. You can preserve your windows environment and create a linux ecosystem to run Golang.
Step 1 : Install Oracle VM Virtual Box.
Step 2 : Download Ubuntu Installer Desktop stable version.
Step 3 : Open VM Virtual Box and create new virtual machine, choose operation system linux and version Ubuntu and a good number of RAM memory. Storage > IDE Controller > CD/DVD Drive > set to Ubuntu Installer downloaded previously.
Step 4 : Run new virtual machine and install Ubuntu OS.
Step 5 : Start Ubuntu and open terminal window through right mouse button and run this commands:
$ wget https://storage.googleapis.com/golang/go1.9.4.linux-amd64.tar.gz
$ sudo tar -xvf go1.9.4.linux-amd64.tar.gz
$ sudo mv go /usr/local
What did you do? First download Go binary files compressed (tar.gz), uncompressed them and move directory go to /usr/local.
Step 6 : Setup Go Environment
$ export GOROOT=/usr/local/go
Suggested folder names “Projects/Go”
$ mkdir -p $HOME/Projects/Go
$ export GOPATH=$HOME/Projects/Go
$ export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
Here you create your Go application and becoming compatible to use github:
$ mkdir -p $HOME/Projects/Go/src/github.com/user/projectname
Thank you.