URL for Latest Stable Go Release
Is there a permanent URL for the current latest Linux binary release of Go?
You're trying to create an Ansible script that downloads and installs the latest Go release. However, the Go download site only provides release-specific links, such as https://golang.org/dl/go1.19.2.linux-amd64.tar.gz.
Do you know of a URL like https://dl.google.com/go/latest.linux-amd64.tar.gz that points to the latest stable Go release?
Fortunately, there's a solution that lets you download the latest stable Go version with a single command:
wget "https://dl.google.com/go/$(curl https://go.dev/VERSION?m=text).linux-amd64.tar.gz"
This command uses curl to fetch the latest Go version from https://go.dev/VERSION and then uses that value to construct the URL for the latest Linux amd64 binary release, which is then downloaded using wget.
The above is the detailed content of Is there a permanent URL for the latest stable Go release on Linux?. For more information, please follow other related articles on the PHP Chinese website!