Tool that helps you to retrieve latest Go update from Google
Goup is a little utility that helps you to check and upgrade your local non-container Go version. It bascially does the following step-by-step:
- Run
go version
to determine local Go version andgo env
for$GOPATH
. The location ofgo
is determined by supplied-p
param,$PATH
variable or default installation location (/usr/local/go
orC:\Go
) - Check https://go.googlesource.com/go/+refs to see if there is a version (tags starts with
go
), compare it against local version retrieved in (1). Can include beta, RC and latest major/minor version for comparison with-b
,-rc
and-u
. - If there is a new version available, download it to temporary directory.
- Backup existing Go installtion to temp.
- Extract new Go archive to
$GOROOT
. - In case of an error, reverse backup to
$GOROOT
.
go get -u github.com/mkishere/goup
go build cmd/goup.go
goup