Home >Backend Development >Golang >How to Download the Latest Go Release for Linux?

How to Download the Latest Go Release for Linux?

Linda Hamilton
Linda HamiltonOriginal
2024-11-08 21:39:02921browse

How to Download the Latest Go Release for Linux?

Obtaining the Latest Go Release URL

Q: Is there a permanent URL that directs to the most recent Linux binary release of Go?

This inquiry stems from the need to create an Ansible script that downloads and installs the latest Go release. However, the official Go download website ("https://golang.org/dl/") only provides download links for specific versions.

Q: Is there a direct link to the latest version, such as "https://dl.google.com/go/latest.linux-amd64.tar.gz"?

A: Yes, the following URL can be used to download the latest stable Go release:

https://dl.google.com/go/$(curl https://go.dev/VERSION?m=text).linux-amd64.tar.gz

This command combines the base URL ("https://dl.google.com/go/") with the latest version number obtained from the "go.dev" website ("https://go.dev/VERSION?m=text").

The above is the detailed content of How to Download the Latest Go Release for Linux?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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