Skip to content

latestgo is a tool to automatically install the latest supported golang versions.

License

Notifications You must be signed in to change notification settings

tmthrgd/latestgo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

latestgo

latestgo is a tool to automatically install the latest supported golang versions.

Installation

Installation is simple and no different to any Go tool. The only requirement is a working Go install.

go get go.tmthrgd.dev/latestgo

Usage

latestgo

That's it. That's all there is to it.

latestgo will install the golang.org/dl wrappers for the latest patch release for each supported version of go. This means you can run a specific go version by running go1.X.Y. The go distribution will be installed into $HOME/sdk/go1.X.Y.

As a convenience, latestgo writes the latest supported version of go to $HOME/sdk/latest. This file can be used by shell scripts to find the latest go binary. For example, in my .bash_profile I add $HOME/sdk/$(cat ~/sdk/latest)/bin to $PATH so go will always be the latest version of go installed.

latestgo also provides a single flag -all that will download all versions of go since go1.8, including all patch releases, instead of only the latest supported versions (the highest patch release of the last two major versions).

License

BSD 3-Clause License

Note

latestgo uses the JSON feed at https://golang.org/dl/?mode=json to retrieve the latest supported versions.

About

latestgo is a tool to automatically install the latest supported golang versions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages