- 美团外卖满减,直降,运费活动API完成

This commit is contained in:
gazebo
2019-04-03 22:01:17 +08:00
parent f105cfed62
commit 21818bd78d
6 changed files with 365 additions and 58 deletions

View File

@@ -30,3 +30,42 @@ func TestConv(t *testing.T) {
}
}
}
func TestMarshal(t *testing.T) {
type InnerStruct struct {
InnerIntData int
}
type OutStruct struct {
InnerStruct
IntData int
StrData string
InnerData InnerStruct
PtrInnerData *InnerStruct
}
type OutStruct2 struct {
*InnerStruct
IntData int
StrData string
}
obj := OutStruct{
InnerStruct: InnerStruct{
InnerIntData: 3,
},
IntData: 1,
StrData: "2",
InnerData: InnerStruct{
InnerIntData: 4,
},
}
t.Log(Format4Output(obj, false))
t.Log(Format4Output(Struct2FlatMap(obj), false))
obj2 := OutStruct2{
InnerStruct: &InnerStruct{
InnerIntData: 2,
},
}
t.Log(Format4Output(obj2, false))
t.Log(Format4Output(Struct2FlatMap(obj2), false))
}