Skip to content

Instantly share code, notes, and snippets.

@egidijus
Last active October 2, 2018 10:42
Show Gist options
  • Save egidijus/37b7018b0bbe66dc1b235707441b06b1 to your computer and use it in GitHub Desktop.
Save egidijus/37b7018b0bbe66dc1b235707441b06b1 to your computer and use it in GitHub Desktop.
how to start with golang

golang installation linux

download

wget https://dl.google.com/go/go1.11.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.11.linux-amd64.tar.gz
mkdir ~/go

set paths

add these paths to your bash/zsh profile

export GOPATH=/home/$USER/go
export GOROOT=/usr/local/go
export GOBIN=/home/$USER/go/bin/

after you reload your terminal profile, you should be able to fetch go packages using go.

go get golang.org/x/tools/cmd/goimports

go package management

where to GO for documentation

tips for workflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment