Skip to content

Reference

Facts about what this module does. For the Go API (types, signatures, doc comments) see pkg.go.dev, which is generated from the source and cannot drift from it.

In this section

Options

Option Effect
WithVersion Resolve a version other than DefaultVersion
WithCacheDir Store extracted libraries somewhere specific
WithPlatform Select another platform's archive, for cross-provisioning
WithExecutableDir Change where a bundled library is looked for

Sentinel errors

Error Means
ErrNoPlatformBuild No archive is published for this GOOS/GOARCH
ErrNotInArchive The archive did not contain the expected library
ErrOversizeLibrary The decompressed library exceeded the bound
ErrNoFetcher New was called without a fetcher

Errors from go/artifacts are wrapped rather than replaced, so its sentinels match through this module's errors.