Langsung ke konten utama

Install Golang, Glide,

Download
$ curl -O https://storage.googleapis.com/golang/go1.10.linux-amd64.tar.gz

Ekstrak
$ sudo tar -C /usr/local/ -xzf go1.10.linux-amd64.tar.gz

Setting Path
$ sudo nano ~/.profile

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

export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GOBIN=$GOROOT/bin

GOROOT: Location where Go Package installed
GOPATH: Location of your work directory
GOBIN : Location golang binary

Refresh profile
$ source ~/.profile

If use zshbash, change at ~/.zshrc then resfresh it

Check environment
$ go env

Ekstra ===============================================
Install glide
$ sudo curl https://glide.sh/get | sh
or
$ sudo add-apt-repository ppa:masterminds/glide && sudo apt-get update
$ sudo apt-get install glide


Komentar