GoAppResource.withGoPrivate

Method
📦 Aspire.Hosting.Go v17.0.0
interface GoAppResource {
// ... omitted for brevity
withGoPrivate(
privatePatterns: string[],
authHost: string,
usernameArgName?: string,
tokenSecretId?: string): GoAppResource;
}

Signature

methodwithGoPrivatebuilder
Configures private Go module authentication for publish-time Dockerfile generation.
withGoPrivate(
privatePatterns: string[],
authHost: string,
usernameArgName?: string,
tokenSecretId?: string): GoAppResource
privatePatternsstring[]One or more module path patterns that should bypass the public proxy and checksum database, e.g. `"*.mycompany.com"` or `"github.com/myorg"`. Passed verbatim to `GOPRIVATE`, which implicitly covers `GONOSUMCHECK` and `GONOPROXY`.
authHoststringThe Git host that requires authentication, e.g. `"github.com"`.
usernameArgNamestringoptional= GIT_USERThe Docker build-arg name for the Git username. Defaults to `"GIT_USER"`. Pass it at build time with `--build-arg GIT_USER=myuser`.
tokenSecretIdstringoptional= gittokenThe BuildKit secret ID for the Git access token. Defaults to `"gittoken"`. Pass it at build time with `--secret id=gittoken,src=/path/to/token`.
GoAppResource

Defined on

This method is defined on the following type: