MCPcopy Index your code
hub / github.com/vmihailenco/msgpack / DecodeArrayLen

Method DecodeArrayLen

decode_slice.go:13–19  ·  view source on GitHub ↗

DecodeArrayLen decodes array length. Length is -1 when array is nil.

()

Source from the content-addressed store, hash-verified

11
12// DecodeArrayLen decodes array length. Length is -1 when array is nil.
13func (d *Decoder) DecodeArrayLen() (int, error) {
14 c, err := d.readCode()
15 if err != nil {
16 return 0, err
17 }
18 return d.arrayLen(c)
19}
20
21func (d *Decoder) arrayLen(c byte) (int, error) {
22 if c == msgpcode.Nil {

Callers 5

decodeStringSlicePtrMethod · 0.95
queryArrayIndexMethod · 0.95
DecodeMsgpackMethod · 0.80
decodeSliceValueFunction · 0.80
decodeArrayValueFunction · 0.80

Calls 2

readCodeMethod · 0.95
arrayLenMethod · 0.95

Tested by 1

DecodeMsgpackMethod · 0.64