-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Description
The Go ecosystem lacks a standard way to check whether a system is running the latest revision of the current {major}.{minor} version of Go available.
https://go.dev/dl/?mode=json already provides a machine-readable (JSON) list of all the currently supported versions, but integrating it into a toolchain often requires complex scripts with external dependencies (e.g. curl, jq).
It seems like something the go command should handle in a consistent way.
My proposal is to extend go version with a new check command as following:
With no parameters, it would check whether the system is running the latest revision of the current major version installed.
> go version check
Running the latest revision of Go 1.20 (go1.20.3 darwin/arm64).
(code 0)With a --latest flag, it would check whether the system is running the latest major release of Go.
> go version check --latest
Go 1.20 is available → https://tip.golang.org/doc/go1.20
(code 1)Ideally, this would also serve warnings for out-of-support versions:
> go version check
Go 1.18 is no longer supported (go1.18.10 darwin/arm64).
(code 1)Metadata
Metadata
Assignees
Labels
Type
Projects
Status