Use the Type field to determine which variant is active, then access the corresponding field:
switch imageConfig.Type { case components.ImageConfigTypeStr: // imageConfig.Str is populated case components.ImageConfigTypeNumber: // imageConfig.Number is populated case components.ImageConfigTypeArrayOfAny: // imageConfig.ArrayOfAny is populated}
⌘I
Assistant
Responses are generated using AI and may contain mistakes.