MCPcopy
hub / github.com/ugorji/go / codecDecodeSelfFromArray

Method codecDecodeSelfFromArray

codec/values_codecgen_generated_test.go:293–320  ·  view source on GitHub ↗
(l int, d *Decoder)

Source from the content-addressed store, hash-verified

291}
292
293func (x *stringUint64T) codecDecodeSelfFromArray(l int, d *Decoder) {
294 var h codecSelfer19780
295 z, r := GenHelper().Decoder(d)
296 _, _, _ = h, z, r
297 var yyj6 int
298 var yyb6 bool
299 var yyhl6 bool = l >= 0
300 yyb6 = !z.DecContainerNext(yyj6, l, yyhl6)
301 if yyb6 {
302 z.DecReadArrayEnd()
303 return
304 }
305 z.DecReadArrayElem()
306 x.S = (string)(z.DecStringZC(r.DecodeStringAsBytes()))
307 yyj6++
308 yyb6 = !z.DecContainerNext(yyj6, l, yyhl6)
309 if yyb6 {
310 z.DecReadArrayEnd()
311 return
312 }
313 z.DecReadArrayElem()
314 x.U = (uint64)(r.DecodeUint64())
315 yyj6++
316 for ; z.DecContainerNext(yyj6, l, yyhl6); yyj6++ {
317 z.DecReadArrayElem()
318 z.DecStructFieldNotFound(yyj6-1, "")
319 }
320}
321
322func (x *stringUint64T) IsCodecEmpty() bool {
323 return !(x.S != "" || x.U != 0 || false)

Callers 1

CodecDecodeSelfMethod · 0.95

Calls 9

GenHelperFunction · 0.85
DecoderMethod · 0.80
DecContainerNextMethod · 0.80
DecReadArrayEndMethod · 0.80
DecReadArrayElemMethod · 0.80
DecStringZCMethod · 0.80
DecodeStringAsBytesMethod · 0.65
DecodeUint64Method · 0.65

Tested by

no test coverage detected