-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
Sometimes it's useful to have partially defined types for the data, but still being able to collect the remaining fields in more of a dynamic way as a map[string]any
or map[any]any
.
Describe the solution you'd like
Introduce a new struct field tag, similar to the remain
tag in the popular mapstructure library. The type of a field with such a tag should be a map, into which those values that are not defined on the concrete type could be collected for later access.
Describe alternatives you've considered
Having a named type for a map, like type UnknownFields map[string]any
which when embedded into a struct would collect the remainder fields.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request