Closed shuqingzai closed 1 year ago
Currently, there is no automatic way for this. So you've to define every field via map:
// goverter:converter
type Converter interface {
// goverter:map Address.Street Street
// goverter:map Address.ZipCode ZipCode
Convert(Person) FlatPerson
}
With v0.15.0 you can use goverter:autoMap
: https://goverter.jmattheis.de/#/conversion/mapping?id=auto-map
The example of the first comment can be fixed with:
// goverter:converter
type Converter interface {
// goverter:autoMap Address
Convert(Person) FlatPerson
}
Have you read the project readme?
Describe your question A clear and concise description of what the question is. Include errors and go source files.
mapping#source-object The reverse operation does not seem to be supported, what should I do?