Use the Type field to determine which variant is active, then access the corresponding field:
switch stop.Type { case components.StopTypeStr: // stop.Str is populated case components.StopTypeArrayOfStr: // stop.ArrayOfStr is populated case components.StopTypeAny: // stop.Any is populated}
⌘I
Assistant
Responses are generated using AI and may contain mistakes.