Skip to content

Commit

Permalink
Improve the comment for go_sdk.host() in the installation docs (#4230)
Browse files Browse the repository at this point in the history
**What type of PR is this?**

Documentation

**What does this PR do?**

Explicitly call out `go_sdk.host()` as an alternative to
`go_sdk.download()` in the Bzlmod installation documentation, and point
clearly to the nota bene associated with it.

**What does this PR do? Why is it needed?**

Avoiding people from copying and pasting the code without understanding
that `go_sdk.host()` should be omitted when using `go_sdk.download()`
(as well as making sure that there's a clear pointer to its drawbacks).

**Which issues(s) does this PR fix?**

N/A
  • Loading branch information
stefanobaghino authored Jan 15, 2025
1 parent 203aa70 commit 141d912
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/go/core/bzlmod.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
# Download an SDK for the host OS & architecture as well as common remote execution platforms.
go_sdk.download(version = "1.23.1")

# Alternately, download an SDK for a fixed OS/architecture.
# Alternatively, download an SDK for a fixed OS/architecture.
go_sdk.download(
version = "1.23.1",
goarch = "amd64",
goos = "linux",
)

# Register the Go SDK installed on the host.
# Another alternative is to register the Go SDK installed on the host (see the nota bene below).
go_sdk.host()
```

Expand Down

0 comments on commit 141d912

Please sign in to comment.