Format - Go SDK

Format type definition

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

Supported Types

FormatText

1format := components.CreateFormatText(components.FormatText{/* values here */})

FormatGrammar

1format := components.CreateFormatGrammar(components.FormatGrammar{/* values here */})

Union Discrimination

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

1switch format.Type {
2 case components.FormatTypeTextValue:
3 // format.FormatText is populated
4 case components.FormatTypeGrammarValue:
5 // format.FormatGrammar is populated
6 default:
7 // Unknown type - use format.GetUnknownRaw() for raw JSON
8}