Outcome - Go SDK

Outcome type definition

The Go SDK and docs are currently in beta. Report issues on GitHub.

Supported Types

OutcomeExit

1outcome := components.CreateOutcomeExit(components.OutcomeExit{/* values here */})

OutcomeTimeout

1outcome := components.CreateOutcomeTimeoutObj(components.OutcomeTimeout{/* values here */})

Union Discrimination

Use the Type field to determine which variant is active, then access the corresponding field:

1switch outcome.Type {
2 case components.OutcomeTypeExit:
3 // outcome.OutcomeExit is populated
4 case components.OutcomeTypeTimeoutObj:
5 // outcome.OutcomeTimeout is populated
6 default:
7 // Unknown type - use outcome.GetUnknownRaw() for raw JSON
8}