docs: document buildTestBinaries for buildGoModule

Signed-off-by: Paul Meyer <katexochen0@gmail.com>
This commit is contained in:
Paul Meyer
2025-07-21 20:08:18 +02:00
parent 1d2563835a
commit 969cc016b0
2 changed files with 9 additions and 0 deletions

View File

@@ -194,6 +194,12 @@ Specifies the contents of the `go.sum` file and triggers rebuilds when it change
Defaults to `null`
### `buildTestBinaries` {#var-go-buildTestBinaries}
This option allows to compile test binaries instead of the usual binaries produced by a package.
Go can [compile test into binaries](https://pkg.go.dev/cmd/go#hdr-Test_packages) using the `go test -c` command.
These binaries can then be executed at a later point (outside the Nix sandbox) to run the tests.
This is mostly useful for downstream consumers to run integration or end-to-end tests that won't work in the Nix sandbox, for example because they require network access.
## Versioned toolchains and builders {#ssec-go-toolchain-versions}

View File

@@ -532,6 +532,9 @@
"typst-package-scope-and-usage": [
"index.html#typst-package-scope-and-usage"
],
"var-go-buildTestBinaries": [
"index.html#var-go-buildTestBinaries"
],
"var-meta-teams": [
"index.html#var-meta-teams"
],