Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: support mapping between pointer and value #25

Open
shyandsy opened this issue Apr 17, 2022 · 0 comments
Open

proposal: support mapping between pointer and value #25

shyandsy opened this issue Apr 17, 2022 · 0 comments
Assignees
Labels
Milestone

Comments

@shyandsy
Copy link
Collaborator

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
}
@shyandsy shyandsy added this to the v0.8.0 milestone Apr 17, 2022
@shyandsy shyandsy added proposal and removed feature labels Apr 17, 2022
@shyandsy shyandsy changed the title feature: support mapping between pointer and value proposal: support mapping between pointer and value Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants