Is there a permanent URL for the latest stable Go release on Linux?

Barbara Streisand
Release: 2024-11-12 08:27:02
Original
864 people have browsed it

Is there a permanent URL for the latest stable Go release on Linux?

URL for Latest Stable Go Release

Query:

Is there a permanent URL for the current latest Linux binary release of Go?

Background:

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.

Question:

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?

Response:

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"
Copy after login

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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template