# GoAppResource.WithAppArgs

- Module: [Aspire.Hosting.Go](/reference/api/go/aspire.hosting.go.md)
- Defined on: [GoAppResource](/reference/api/go/aspire.hosting.go/goappresource.md)
- Version: `17.0.0`
- Kind: `method`

Passes extra arguments to the Go program at runtime. In normal run mode they appear after `go run .`; in Delve mode after the `--` separator.

## Definition

```go
type GoAppResource interface {
    // ... omitted for brevity
    WithAppArgs(args []any) GoAppResource
}
```

## Signature

```go
WithAppArgs(args []any) GoAppResource
```

## Parameters

- `args` (`[]any`) -- The program arguments (e.g., `"serve"`, `"--config"`, `"prod.yaml"`).

## Returns

[`GoAppResource`](/reference/api/go/aspire.hosting.go/goappresource.md) -- The resource builder.

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

## Defined on

- [GoAppResource](/reference/api/go/aspire.hosting.go/goappresource.md) -- `handle`
