Skip to content

Commit 087f188

Browse files
committed
Add an example for go_download_sdk.sdks
Fixes #3136.
1 parent ba46686 commit 087f188

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

go/toolchains.rst

+14-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,20 @@ This downloads a Go SDK for use in toolchains.
296296
name = "go_sdk",
297297
goos = "linux",
298298
goarch = "amd64",
299-
version = "1.12.5",
299+
version = "1.18.1",
300+
sdks = {
301+
# NOTE: In most cases the whole sdks attribute is not needed.
302+
# There are 2 "common" reasons you might want it:
303+
#
304+
# 1. You need to use an modified GO SDK, or an unsupported version
305+
# (for example, a beta or release candidate)
306+
#
307+
# 2. You want to avoid the dependency on the index file for the
308+
# SHA-256 checksums. In this case, You can get the expected
309+
# filenames and checksums from https://go.dev/dl/
310+
"linux_amd64": ("go1.18.1.linux-amd64.tar.gz", "b3b815f47ababac13810fc6021eb73d65478e0b2db4b09d348eefad9581a2334"),
311+
"darwin_amd64": ("go1.18.1.darwin-amd64.tar.gz", "3703e9a0db1000f18c0c7b524f3d378aac71219b4715a6a4c5683eb639f41a4d"),
312+
},
300313
)
301314
302315
go_rules_dependencies()

0 commit comments

Comments
 (0)