(e *Encoder)
| 183 | |
| 184 | func (stringUint64T) codecSelferViaCodecgen() {} |
| 185 | func (x *stringUint64T) CodecEncodeSelf(e *Encoder) { |
| 186 | var h codecSelfer19780 |
| 187 | z, r := GenHelper().Encoder(e) |
| 188 | _, _, _ = h, z, r |
| 189 | if z.EncBasicHandle().CheckCircularRef { |
| 190 | z.EncEncode(x) |
| 191 | return |
| 192 | } |
| 193 | if x == nil { |
| 194 | r.EncodeNil() |
| 195 | } else { |
| 196 | yy2arr2 := z.EncBasicHandle().StructToArray |
| 197 | _ = yy2arr2 |
| 198 | const yyr2 bool = false // struct tag has 'toArray' |
| 199 | if yyr2 || yy2arr2 { |
| 200 | z.EncWriteArrayStart(2) |
| 201 | z.EncWriteArrayElem() |
| 202 | r.EncodeString(string(x.S)) |
| 203 | z.EncWriteArrayElem() |
| 204 | r.EncodeUint(uint64(x.U)) |
| 205 | z.EncWriteArrayEnd() |
| 206 | } else { |
| 207 | z.EncWriteMapStart(2) |
| 208 | if z.EncBasicHandle().Canonical { |
| 209 | z.EncWriteMapElemKey() |
| 210 | if z.IsJSONHandle() { |
| 211 | z.EncWr().WriteStr("\"S\"") |
| 212 | } else { |
| 213 | r.EncodeString(`S`) |
| 214 | } |
| 215 | z.EncWriteMapElemValue() |
| 216 | r.EncodeString(string(x.S)) |
| 217 | z.EncWriteMapElemKey() |
| 218 | if z.IsJSONHandle() { |
| 219 | z.EncWr().WriteStr("\"U\"") |
| 220 | } else { |
| 221 | r.EncodeString(`U`) |
| 222 | } |
| 223 | z.EncWriteMapElemValue() |
| 224 | r.EncodeUint(uint64(x.U)) |
| 225 | } else { |
| 226 | z.EncWriteMapElemKey() |
| 227 | if z.IsJSONHandle() { |
| 228 | z.EncWr().WriteStr("\"S\"") |
| 229 | } else { |
| 230 | r.EncodeString(`S`) |
| 231 | } |
| 232 | z.EncWriteMapElemValue() |
| 233 | r.EncodeString(string(x.S)) |
| 234 | z.EncWriteMapElemKey() |
| 235 | if z.IsJSONHandle() { |
| 236 | z.EncWr().WriteStr("\"U\"") |
| 237 | } else { |
| 238 | r.EncodeString(`U`) |
| 239 | } |
| 240 | z.EncWriteMapElemValue() |
| 241 | r.EncodeUint(uint64(x.U)) |
| 242 | } |
nothing calls this directly
no test coverage detected