MCPcopy Create free account
hub / github.com/devfeel/mapper / main

Function main

example/structfield/main.go:36–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34}
35
36func main() {
37 from := &ProductBasic{
38 ProductId: 10001,
39 CategoryType: 1,
40 ProductTitle: "Test Product",
41 Item: ItemStruct1{ProductId: 20, Name: "pro", Item: "1"},
42 Data: []byte{1, 2, 3, 4},
43 CreateTime: time.Now(),
44 }
45 to := &ProductGetResponse{}
46 mapper.AutoMapper(from, to)
47
48 from2 := &ProductBasic{}
49 mapper.Mapper(to, from2)
50 fmt.Println(from)
51 fmt.Println(to)
52 fmt.Println(from2)
53}

Callers

nothing calls this directly

Calls 2

AutoMapperFunction · 0.92
MapperFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…