====== Cross compile ======
===== From linux to windows =====
Make sure the toolchain for windows is installed.
sudo pacman -S mingw-w64-gcc
**32bit**
CGO_ENABLED=1 CC=i686-w64-mingw32-gcc GOOS=windows GOARCH=386 go build -o gorvp.exe main.go
**64bit**
CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -o gorvp.exe main.go
====== Install GO on CentOS ======
===== Binary =====
wget https://storage.googleapis.com/golang/go1.7.3.linux-amd64.tar.gz
tar -zxf go1.7.3.linux-amd64.tar.gz -C /usr/local/
mkdir /Golang
vim /etc/profile
export GOROOT=/usr/local/go
export GOBIN=$GOROOT/bin
export GOPKG=$GOROOT/pkg/tool/linux_amd64
export GOARCH=amd64
export GOOS=linux
export PATH=$PATH:$GOBIN:$GOPKG
vim ~/.bash_profile
export GOPATH=/Golang
export PATH=$PATH:$GOPATH/bin
==== YUM ====
yum install epel -y
yum install go -y
vim ~/.bash_profile
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin