1. install
$ sudo apt-get update
$ sudo apt-get upgrade -y
$ sudo apt-get install golang -y
$ sudo apt-get install git -y
# create project directory
$ mkdir $HOME/go
$ mkdir $HOME/go/bin
2. Setting path
$ echo "export GOROOT=/usr/lib/go" >> /home/vagrant/.bashrc
$ echo "export GOBIN=/usr/bin/go" >> /home/vagrant/.bashrc
$ echo "export GOPATH=$HOME/go" >> /home/vagrant/.bashrc
$ echo "export PATH=$PATH:$GOPATH/bin:$GOROOT/bin" >> /home/vagrant/.bashrc
3. Download library
$ go get {URL}
$ go get github.com/gorilla/mux
$ go get github.com/gorilla/sessions
4. Sample
- http://localhost:8080/mapstore/set/{key}/{value}
- http://localhost:8080/mapstore/get/{key}