Skip to content

Commit

Permalink
update version manifest URL (#3314)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminp committed Oct 5, 2022
1 parent 641b246 commit 22937fb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions go/private/sdk.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _go_download_sdk_impl(ctx):
ctx.report_progress("Finding Go SHA-256 sums")
ctx.download(
url = [
"https://golang.org/dl/?mode=json&include=all",
"https://go.dev/dl/?mode=json&include=all",
"https://golang.google.cn/dl/?mode=json&include=all",
],
output = "versions.json",
Expand All @@ -89,10 +89,10 @@ def _go_download_sdk_impl(ctx):
if not highest_version or _version_less(highest_version, pv):
highest_version = pv
if not highest_version:
fail("did not find any Go versions in https://golang.org/dl/?mode=json")
fail("did not find any Go versions in https://go.dev/dl/?mode=json")
version = _version_string(highest_version)
if version not in sdks_by_version:
fail("did not find version {} in https://golang.org/dl/?mode=json".format(version))
fail("did not find version {} in https://go.dev/dl/?mode=json".format(version))
sdks = sdks_by_version[version]

if platform not in sdks:
Expand Down Expand Up @@ -327,11 +327,11 @@ def _detect_sdk_version(ctx, goroot):
return version

def _parse_versions_json(data):
"""Parses version metadata returned by golang.org.
"""Parses version metadata returned by go.dev.
Args:
data: the contents of the file downloaded from
https://golang.org/dl/?mode=json. We assume the file is valid
https://go.dev/dl/?mode=json. We assume the file is valid
JSON, is spaced and indented, and is in a particular format.
Return:
Expand Down

0 comments on commit 22937fb

Please sign in to comment.