This is probably basic, but I'm working on some code that unmarshals JIRA
tickets (just for some context). Examining the Json output, there is a big
"fields" object that mostly contains custom fields, but also some defined
fields. Right now, I defined "Fields" as a "map[string]any", which is
appropriate for the custom fields. However, I would really like to define
something like this:
type JIRAFields struct {
map[string]any
Parent JIRAParent
}
type JIRAParent struct {
...
}
So I could reference a custom field like "Fields[key]", but the parent
field with "Fields.Parent".
I'm certain the syntax I have so far isn't correct, as it flags the "map"
saying "}" was expected.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/CAA5t8VqfpZ7og6Zxobcy388Zbyj%2BnTGc-J0gW_LBj9ngrErg4w%40mail.gmail.com.