A simple and easy go tools for auto mapper map to struct, struct to map, struct to struct, slice to slice, map to slice, map to json.
// Base model
type BaseModel struct {
Id int `json:"id"`
}
// Country model
type Country struct {
BaseModel `json:"composite-field"`
Name string `json:"name"`
}
feature:
thanks @shyandsy
//view test code in mapper_test.go:Test_MapperSlice\Test_MapperStructSlice
//type ptr
var toSlice []*testStruct
//type struct
var toSlice []testStruct
//view test code in mapper_test.go:Test_MapperMapSlice\Test_MapperStructMapSlice
//type ptr
var fromSlice []*FromStruct
var toSlice []*ToStruct
//type struct
var fromSlice []FromStruct
var toSlice []ToStruct