Benchmark harness support for STK-REQ-004.
(e *codec1978.Encoder)
| 895 | |
| 896 | // Benchmark harness support for STK-REQ-004. |
| 897 | func (x *CBGithub) CodecEncodeSelf(e *codec1978.Encoder) { |
| 898 | var h codecSelfer6617 |
| 899 | z, r := codec1978.GenHelperEncoder(e) |
| 900 | _, _, _ = h, z, r |
| 901 | if x == nil { |
| 902 | r.EncodeNil() |
| 903 | } else { |
| 904 | if false { |
| 905 | } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { |
| 906 | z.EncExtension(x, yyxt1) |
| 907 | } else if !z.EncBinary() && z.IsJSONHandle() { |
| 908 | z.EncJSONMarshal(x) |
| 909 | } else { |
| 910 | yysep2 := !z.EncBinary() |
| 911 | yy2arr2 := z.EncBasicHandle().StructToArray |
| 912 | _, _ = yysep2, yy2arr2 |
| 913 | const yyr2 bool = false // struct tag has 'toArray' |
| 914 | if yyr2 || yy2arr2 { |
| 915 | r.WriteArrayStart(1) |
| 916 | } else { |
| 917 | r.WriteMapStart(1) |
| 918 | } |
| 919 | if yyr2 || yy2arr2 { |
| 920 | r.WriteArrayElem() |
| 921 | if false { |
| 922 | } else { |
| 923 | r.EncodeInt(int64(x.Followers)) |
| 924 | } |
| 925 | } else { |
| 926 | r.WriteMapElemKey() |
| 927 | if z.IsJSONHandle() { |
| 928 | z.WriteStr("\"Followers\"") |
| 929 | } else { |
| 930 | r.EncodeStringEnc(codecSelferCcUTF86617, `Followers`) |
| 931 | } |
| 932 | r.WriteMapElemValue() |
| 933 | if false { |
| 934 | } else { |
| 935 | r.EncodeInt(int64(x.Followers)) |
| 936 | } |
| 937 | } |
| 938 | if yyr2 || yy2arr2 { |
| 939 | r.WriteArrayEnd() |
| 940 | } else { |
| 941 | r.WriteMapEnd() |
| 942 | } |
| 943 | } |
| 944 | } |
| 945 | } |
| 946 | |
| 947 | // Benchmark harness support for STK-REQ-004. |
| 948 | func (x *CBGithub) CodecDecodeSelf(d *codec1978.Decoder) { |
nothing calls this directly
no outgoing calls
no test coverage detected