Closed fitan closed 2 years ago
mapIdentity is only allowed on structs, you've to define it like this:
// goverter:converter
type Converter interface {
// goverter:mapIdentity Address
ConvertPerson(source Person) APIPerson
ConvertPersons(source []Person) []APIPerson
}
mapIdentity只允许在结构上,你必须像这样定义它:
// goverter:converter type Converter interface { // goverter:mapIdentity Address ConvertPerson(source Person) APIPerson ConvertPersons(source []Person) []APIPerson }
I'm glad he made it. Thank you for your quick answer
Describe the bug A clear and concise description of what the bug is.
To Reproduce![image](https://user-images.githubusercontent.com/34503273/176849562-a2167d11-66fb-4d57-b9ef-172bc5249bab.png)
Expected behavior A clear and concise description of what you expected to happen.