Watch Aspire live streamsDocsTry Aspire

Aspire.Hosting.Go

Official
📦 Aspire.Hosting.Gov13.6.0-preview.1.26478.8
8Functions
2Types

Types

Functions

methodaddGoAppbuilder
Adds a Go application to the application model. The Go toolchain must be available on the PATH.
addGoApp(name: string, appDirectory: string, packagePath?: string, buildTags?: string[], ldFlags?: string, gcFlags?: string, raceDetector?: boolean): GoAppResource
methodwithAppArgsbuilder
Passes extra arguments to the Go program at runtime. In normal run mode they appear after `go run .`; in Delve mode after the `--` separator.
withAppArgs(args: any[]): GoAppResource
methodwithDelveServerbuilder
Starts a configurable headless Delve debug server so that DAP-compatible clients can attach remotely. The application is launched with `dlv debug` instead of `go run`. Delve must be available on the PATH.
withDelveServer(options?: DelveServerOptions): GoAppResource
methodwithGoPrivatebuilder
Configures private Go module authentication for publish-time Dockerfile generation.
withGoPrivate(privatePatterns: string[], authHost: string, usernameArgName?: string, tokenSecretId?: string): GoAppResource
methodwithModDownloadbuilder
Runs `go mod download` before starting the application, pre-fetching all module dependencies into the local module cache without modifying `go.sum`. The main application waits for the download step to complete successfully before launching.
withModDownload(): GoAppResource
methodwithModTidybuilder
Runs `go mod tidy` before starting the application, ensuring `go.sum` is up to date. The main application waits for the tidy step to complete successfully before launching.
withModTidy(): GoAppResource
methodwithModVendorbuilder
Runs `go mod vendor` before starting the application, caching all module dependencies in the local `vendor/` directory. The main application waits for the vendor step to complete successfully before launching.
withModVendor(): GoAppResource
methodwithVetToolbuilder
Runs `go vet ./...` before starting the application to catch static analysis issues. The main application waits for the vet step to complete successfully before launching.
withVetTool(): GoAppResource