Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithAppArgs

Method
📦 Aspire.Hosting.Go v17.0.0
func (GoAppResource) WithAppArgs(args []any) GoAppResource

Signature

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
args[]anyThe program arguments (e.g., "serve", "--config", "prod.yaml").
GoAppResource

The resource builder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: