Closed kingreatwill closed 5 years ago
func ExampleMap_2() {
type ItemStruct1 struct { ProductId int64 } type ItemStruct2 struct { ProductId int64 } type ProductBasic struct { ProductId int64 CategoryType int ProductTitle string item ItemStruct1 } type ProductGetResponse struct { // ProductBasic; ProductId int64 CategoryType int ProductTitle string item ItemStruct2 } basic := &ProductBasic{ ProductId: 10001, CategoryType: 1, ProductTitle: "fdsffdsf待", item: ItemStruct1{ProductId: 20}, } response := &ProductGetResponse{} mapper.AutoMapper(basic, response) fmt.Println(response) // output:20
}
It is now supported in version 0.6.4.
func ExampleMap_2() {
}