(e *Encoder)
| 6879 | |
| 6880 | func (TestCodecgenG) codecSelferViaCodecgen() {} |
| 6881 | func (x *TestCodecgenG) CodecEncodeSelf(e *Encoder) { |
| 6882 | var h codecSelfer19780 |
| 6883 | z, r := GenHelper().Encoder(e) |
| 6884 | _, _, _ = h, z, r |
| 6885 | if z.EncBasicHandle().CheckCircularRef { |
| 6886 | z.EncEncode(x) |
| 6887 | return |
| 6888 | } |
| 6889 | if x == nil { |
| 6890 | r.EncodeNil() |
| 6891 | } else { |
| 6892 | yy2arr2 := z.EncBasicHandle().StructToArray |
| 6893 | _ = yy2arr2 |
| 6894 | const yyr2 bool = false // struct tag has 'toArray' |
| 6895 | if yyr2 || yy2arr2 { |
| 6896 | z.EncWriteArrayStart(1) |
| 6897 | z.EncWriteArrayElem() |
| 6898 | r.EncodeInt(int64(x.TestCodecgenG)) |
| 6899 | z.EncWriteArrayEnd() |
| 6900 | } else { |
| 6901 | z.EncWriteMapStart(1) |
| 6902 | if z.EncBasicHandle().Canonical { |
| 6903 | z.EncWriteMapElemKey() |
| 6904 | if z.IsJSONHandle() { |
| 6905 | z.EncWr().WriteStr("\"TestCodecgenG\"") |
| 6906 | } else { |
| 6907 | r.EncodeString(`TestCodecgenG`) |
| 6908 | } |
| 6909 | z.EncWriteMapElemValue() |
| 6910 | r.EncodeInt(int64(x.TestCodecgenG)) |
| 6911 | } else { |
| 6912 | z.EncWriteMapElemKey() |
| 6913 | if z.IsJSONHandle() { |
| 6914 | z.EncWr().WriteStr("\"TestCodecgenG\"") |
| 6915 | } else { |
| 6916 | r.EncodeString(`TestCodecgenG`) |
| 6917 | } |
| 6918 | z.EncWriteMapElemValue() |
| 6919 | r.EncodeInt(int64(x.TestCodecgenG)) |
| 6920 | } |
| 6921 | z.EncWriteMapEnd() |
| 6922 | } |
| 6923 | } |
| 6924 | } |
| 6925 | |
| 6926 | func (x *TestCodecgenG) CodecDecodeSelf(d *Decoder) { |
| 6927 | var h codecSelfer19780 |
nothing calls this directly
no test coverage detected