internal/version: use dl.google.com/go instead of GCS bucket
https://dl.google.com/go is what the https://golang.org/dl page uses,
and is less likely to be affected by configuration issues, as well as
being more geographically available.
Updates golang/go#45603
Change-Id: Ied2025e3948e795d7bbd067109dfccc8a4e28dd3
Reviewed-on: https://go-review.googlesource.com/c/dl/+/311375
Trust: Filippo Valsorda <filippo@golang.org>
Trust: Alexander Rakoczy <alex@golang.org>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
diff --git a/internal/version/version.go b/internal/version/version.go
index 98e5d4a..275d6cc 100644
--- a/internal/version/version.go
+++ b/internal/version/version.go
@@ -390,10 +390,6 @@
func versionArchiveURL(version string) string {
goos := getOS()
- // TODO: Maybe we should parse
- // https://storage.googleapis.com/go-builder-data/dl-index.txt ?
- // Let's just guess the URL for now and see if it's there.
- // Then we don't have to maintain that txt file too.
ext := ".tar.gz"
if goos == "windows" {
ext = ".zip"
@@ -402,7 +398,7 @@
if goos == "linux" && runtime.GOARCH == "arm" {
arch = "armv6l"
}
- return "https://storage.googleapis.com/golang/" + version + "." + goos + "-" + arch + ext
+ return "https://dl.google.com/go/" + version + "." + goos + "-" + arch + ext
}
const caseInsensitiveEnv = runtime.GOOS == "windows"