#!/bin/bash
set -e -o pipefail

VERSION_NAME=go${VERSION:-1.11}

go get golang.org/dl/${VERSION_NAME}
${VERSION_NAME} download
rm -Rf $HOME/src/pkg
ln -nfs $HOME/bin/${VERSION_NAME} ~/bin/go
