Skip to content

Automap not struct type to struct with one field and vice versa (probably) #197

@a1eks3y

Description

@a1eks3y

Is your feature request related to a problem? Please describe.
Currently, the library does not support automatically mapping a non-struct type to a struct with a single field of the same type. This is especially inconvenient when working with protobuf types, where primitive values are commonly wrapped, such as with optional string Value = 1.

Describe the solution you'd like
Automatically support mapping between primitive types and structs with a single field of the same type. For example, allow mapping between map[string]*string and map[string]StringPtr when StringPtr wraps a *string.

Describe alternatives you've considered
:extend with custom mapping function

Please 👍 this issue if you like this functionality. If you have a specific use-case in mind, feel free to comment it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions