(e *Encoder)
| 6993 | |
| 6994 | func (codecgenH) codecSelferViaCodecgen() {} |
| 6995 | func (x *codecgenH) CodecEncodeSelf(e *Encoder) { |
| 6996 | var h codecSelfer19780 |
| 6997 | z, r := GenHelper().Encoder(e) |
| 6998 | _, _, _ = h, z, r |
| 6999 | if z.EncBasicHandle().CheckCircularRef { |
| 7000 | z.EncEncode(x) |
| 7001 | return |
| 7002 | } |
| 7003 | if x == nil { |
| 7004 | r.EncodeNil() |
| 7005 | } else { |
| 7006 | yy2arr2 := z.EncBasicHandle().StructToArray |
| 7007 | _ = yy2arr2 |
| 7008 | const yyr2 bool = false // struct tag has 'toArray' |
| 7009 | if yyr2 || yy2arr2 { |
| 7010 | z.EncWriteArrayStart(1) |
| 7011 | z.EncWriteArrayElem() |
| 7012 | r.EncodeInt(int64(x.TestCodecgenG.TestCodecgenG)) |
| 7013 | z.EncWriteArrayEnd() |
| 7014 | } else { |
| 7015 | z.EncWriteMapStart(1) |
| 7016 | if z.EncBasicHandle().Canonical { |
| 7017 | z.EncWriteMapElemKey() |
| 7018 | if z.IsJSONHandle() { |
| 7019 | z.EncWr().WriteStr("\"TestCodecgenG\"") |
| 7020 | } else { |
| 7021 | r.EncodeString(`TestCodecgenG`) |
| 7022 | } |
| 7023 | z.EncWriteMapElemValue() |
| 7024 | r.EncodeInt(int64(x.TestCodecgenG.TestCodecgenG)) |
| 7025 | } else { |
| 7026 | z.EncWriteMapElemKey() |
| 7027 | if z.IsJSONHandle() { |
| 7028 | z.EncWr().WriteStr("\"TestCodecgenG\"") |
| 7029 | } else { |
| 7030 | r.EncodeString(`TestCodecgenG`) |
| 7031 | } |
| 7032 | z.EncWriteMapElemValue() |
| 7033 | r.EncodeInt(int64(x.TestCodecgenG.TestCodecgenG)) |
| 7034 | } |
| 7035 | z.EncWriteMapEnd() |
| 7036 | } |
| 7037 | } |
| 7038 | } |
| 7039 | |
| 7040 | func (x *codecgenH) CodecDecodeSelf(d *Decoder) { |
| 7041 | var h codecSelfer19780 |
nothing calls this directly
no test coverage detected