(e *Encoder)
| 7363 | |
| 7364 | func (codecgenL) codecSelferViaCodecgen() {} |
| 7365 | func (x *codecgenL) CodecEncodeSelf(e *Encoder) { |
| 7366 | var h codecSelfer19780 |
| 7367 | z, r := GenHelper().Encoder(e) |
| 7368 | _, _, _ = h, z, r |
| 7369 | if z.EncBasicHandle().CheckCircularRef { |
| 7370 | z.EncEncode(x) |
| 7371 | return |
| 7372 | } |
| 7373 | if x == nil { |
| 7374 | r.EncodeNil() |
| 7375 | } else { |
| 7376 | yy2arr2 := z.EncBasicHandle().StructToArray |
| 7377 | _ = yy2arr2 |
| 7378 | const yyr2 bool = false // struct tag has 'toArray' |
| 7379 | if yyr2 || yy2arr2 { |
| 7380 | z.EncWriteArrayStart(2) |
| 7381 | z.EncWriteArrayElem() |
| 7382 | r.EncodeInt(int64(x.X)) |
| 7383 | z.EncWriteArrayElem() |
| 7384 | r.EncodeUint(uint64(x.Y)) |
| 7385 | z.EncWriteArrayEnd() |
| 7386 | } else { |
| 7387 | z.EncWriteMapStart(2) |
| 7388 | if z.EncBasicHandle().Canonical { |
| 7389 | z.EncWriteMapElemKey() |
| 7390 | if z.IsJSONHandle() { |
| 7391 | z.EncWr().WriteStr("\"X\"") |
| 7392 | } else { |
| 7393 | r.EncodeString(`X`) |
| 7394 | } |
| 7395 | z.EncWriteMapElemValue() |
| 7396 | r.EncodeInt(int64(x.X)) |
| 7397 | z.EncWriteMapElemKey() |
| 7398 | if z.IsJSONHandle() { |
| 7399 | z.EncWr().WriteStr("\"Y\"") |
| 7400 | } else { |
| 7401 | r.EncodeString(`Y`) |
| 7402 | } |
| 7403 | z.EncWriteMapElemValue() |
| 7404 | r.EncodeUint(uint64(x.Y)) |
| 7405 | } else { |
| 7406 | z.EncWriteMapElemKey() |
| 7407 | if z.IsJSONHandle() { |
| 7408 | z.EncWr().WriteStr("\"X\"") |
| 7409 | } else { |
| 7410 | r.EncodeString(`X`) |
| 7411 | } |
| 7412 | z.EncWriteMapElemValue() |
| 7413 | r.EncodeInt(int64(x.X)) |
| 7414 | z.EncWriteMapElemKey() |
| 7415 | if z.IsJSONHandle() { |
| 7416 | z.EncWr().WriteStr("\"Y\"") |
| 7417 | } else { |
| 7418 | r.EncodeString(`Y`) |
| 7419 | } |
| 7420 | z.EncWriteMapElemValue() |
| 7421 | r.EncodeUint(uint64(x.Y)) |
| 7422 | } |
nothing calls this directly
no test coverage detected