# ExecuteCommandResult

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Version: `17.0.0`
- Kind: `struct`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

The result of executing a command. Returned from `ExecuteCommand`.

## Definition

```go
type ExecuteCommandResult struct {
    Success      bool               `json:"Success"`
    Canceled     *bool              `json:"Canceled"`
    ErrorMessage *string            `json:"ErrorMessage"`
    Message      *string            `json:"Message"`
    Data         *CommandResultData `json:"Data"`
}
```

## Fields

- `Success`: `bool` -- A flag that indicates whether the command was successful.
- `Canceled`: `*bool` `optional` -- A flag that indicates whether the command was canceled by the user.
- `ErrorMessage`: `*string` `optional` -- An optional error message that can be set when the command is unsuccessful.
- `Message`: `*string` `optional` -- An optional message associated with the command result.
- `Data`: [`*CommandResultData`](/reference/api/go/aspire.hosting/commandresultdata.md) `optional` -- An optional value produced by the command.
