Skip to content

proposal: support mapping between pointer and value #25

Description

@shyandsy

I plan to make a new feature to support mapping between pointer and value

example:

type A struct{
    Age int `mapper:"age"`
}

type B struct{
    Age *int `mapper:"age"`
} 

func main(){
    a := A{Age:1}
    b := B{}
    m := mapper.NewMapper()

    m.Mapper(&a, &b)

    // now b.Age = 1
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions