1package test 2 3func init() { 4 testCases = append(testCases, 5 (*struct { 6 EmbeddedFloat64 7 })(nil), 8 (*struct { 9 EmbeddedInt32 10 })(nil), 11 (*struct { 12 F1 float64 13 StringMarshaler 14 F2 int32 15 })(nil), 16 (*struct { 17 EmbeddedMapStringString 18 })(nil), 19 (*struct { 20 *EmbeddedFloat64 21 })(nil), 22 (*struct { 23 *EmbeddedInt32 24 })(nil), 25 (*struct { 26 *EmbeddedMapStringString 27 })(nil), 28 (*struct { 29 *EmbeddedSliceString 30 })(nil), 31 (*struct { 32 *EmbeddedString 33 })(nil), 34 (*struct { 35 *EmbeddedStruct 36 })(nil), 37 (*struct { 38 EmbeddedSliceString 39 })(nil), 40 (*struct { 41 EmbeddedString 42 })(nil), 43 (*struct { 44 EmbeddedString `json:"othername"` 45 })(nil), 46 (*struct { 47 EmbeddedStruct 48 })(nil), 49 (*struct { 50 F1 float64 51 StringTextMarshaler 52 F2 int32 53 })(nil), 54 (*OverlapDifferentLevels)(nil), 55 (*IgnoreDeeperLevel)(nil), 56 (*SameLevel1BothTagged)(nil), 57 (*SameLevel1NoTags)(nil), 58 (*SameLevel1Tagged)(nil), 59 (*SameLevel2BothTagged)(nil), 60 (*SameLevel2NoTags)(nil), 61 (*SameLevel2Tagged)(nil), 62 (*EmbeddedPtr)(nil), 63 ) 64} 65 66type EmbeddedFloat64 float64 67type EmbeddedInt32 int32 68type EmbeddedMapStringString map[string]string 69type EmbeddedSliceString []string 70type EmbeddedString string 71type EmbeddedStruct struct { 72 String string 73 Int int32 74 Float float64 75 Struct struct { 76 X string 77 } 78 Slice []string 79 Map map[string]string 80} 81 82type OverlapDifferentLevelsE1 struct { 83 F1 int32 84} 85 86type OverlapDifferentLevelsE2 struct { 87 F2 string 88} 89 90type OverlapDifferentLevels struct { 91 OverlapDifferentLevelsE1 92 OverlapDifferentLevelsE2 93 F1 string 94} 95 96type IgnoreDeeperLevelDoubleEmbedded struct { 97 F1 int32 `json:"F1"` 98} 99 100type IgnoreDeeperLevelE1 struct { 101 IgnoreDeeperLevelDoubleEmbedded 102 F1 int32 103} 104 105type IgnoreDeeperLevelE2 struct { 106 F1 int32 `json:"F1"` 107 IgnoreDeeperLevelDoubleEmbedded 108} 109 110type IgnoreDeeperLevel struct { 111 IgnoreDeeperLevelE1 112 IgnoreDeeperLevelE2 113} 114 115type SameLevel1BothTaggedE1 struct { 116 F1 int32 `json:"F1"` 117} 118 119type SameLevel1BothTaggedE2 struct { 120 F1 int32 `json:"F1"` 121} 122 123type SameLevel1BothTagged struct { 124 SameLevel1BothTaggedE1 125 SameLevel1BothTaggedE2 126} 127 128type SameLevel1NoTagsE1 struct { 129 F1 int32 130} 131 132type SameLevel1NoTagsE2 struct { 133 F1 int32 134} 135 136type SameLevel1NoTags struct { 137 SameLevel1NoTagsE1 138 SameLevel1NoTagsE2 139} 140 141type SameLevel1TaggedE1 struct { 142 F1 int32 143} 144 145type SameLevel1TaggedE2 struct { 146 F1 int32 `json:"F1"` 147} 148 149type SameLevel1Tagged struct { 150 SameLevel1TaggedE1 151 SameLevel1TaggedE2 152} 153 154type SameLevel2BothTaggedDE1 struct { 155 F1 int32 `json:"F1"` 156} 157 158type SameLevel2BothTaggedE1 struct { 159 SameLevel2BothTaggedDE1 160} 161 162// DoubleEmbedded2 TEST ONLY 163type SameLevel2BothTaggedDE2 struct { 164 F1 int32 `json:"F1"` 165} 166 167// Embedded2 TEST ONLY 168type SameLevel2BothTaggedE2 struct { 169 SameLevel2BothTaggedDE2 170} 171 172type SameLevel2BothTagged struct { 173 SameLevel2BothTaggedE1 174 SameLevel2BothTaggedE2 175} 176 177type SameLevel2NoTagsDE1 struct { 178 F1 int32 179} 180 181type SameLevel2NoTagsE1 struct { 182 SameLevel2NoTagsDE1 183} 184 185type SameLevel2NoTagsDE2 struct { 186 F1 int32 187} 188 189type SameLevel2NoTagsE2 struct { 190 SameLevel2NoTagsDE2 191} 192 193type SameLevel2NoTags struct { 194 SameLevel2NoTagsE1 195 SameLevel2NoTagsE2 196} 197 198// DoubleEmbedded1 TEST ONLY 199type SameLevel2TaggedDE1 struct { 200 F1 int32 201} 202 203// Embedded1 TEST ONLY 204type SameLevel2TaggedE1 struct { 205 SameLevel2TaggedDE1 206} 207 208// DoubleEmbedded2 TEST ONLY 209type SameLevel2TaggedDE2 struct { 210 F1 int32 `json:"F1"` 211} 212 213// Embedded2 TEST ONLY 214type SameLevel2TaggedE2 struct { 215 SameLevel2TaggedDE2 216} 217 218type SameLevel2Tagged struct { 219 SameLevel2TaggedE1 220 SameLevel2TaggedE2 221} 222 223type EmbeddedPtrO1 struct { 224 O1F string 225} 226 227type EmbeddedPtrOption struct { 228 O1 *EmbeddedPtrO1 229} 230 231type EmbeddedPtr struct { 232 EmbeddedPtrOption `json:","` 233} 234