latestgo

command module
v0.0.0-...-d0930fa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

README

latestgo

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

Deprecated: This module has been deprecated and will not receive further updates. Use GOTOOLCHAIN instead.

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.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL