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.
MIT License
Bot releases are hidden (Show)
Published by devfeel over 1 year ago
// Base model
type BaseModel struct {
Id int `json:"id"`
}
// Country model
type Country struct {
BaseModel `json:"composite-field"`
Name string `json:"name"`
}
Published by devfeel over 2 years ago
Published by devfeel over 2 years ago
Published by devfeel over 2 years ago
thanks @devfeel
Published by shyandsy over 2 years ago
feature:
thanks @shyandsy
Published by devfeel over 2 years ago
Published by devfeel over 3 years ago
Published by devfeel over 4 years ago
Published by devfeel almost 5 years ago
//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