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

Function decodeByteArrayValue

decode_string.go:173–192  ·  view source on GitHub ↗
(d *Decoder, v reflect.Value)

Source from the content-addressed store, hash-verified

171}
172
173func decodeByteArrayValue(d *Decoder, v reflect.Value) error {
174 c, err := d.readCode()
175 if err != nil {
176 return err
177 }
178
179 n, err := d.bytesLen(c)
180 if err != nil {
181 return err
182 }
183 if n == -1 {
184 return nil
185 }
186 if n > v.Len() {
187 return fmt.Errorf("%s len is %d, but msgpack has %d elements", v.Type(), v.Len(), n)
188 }
189
190 b := v.Slice(0, n).Bytes()
191 return d.readFull(b)
192}

Callers

nothing calls this directly

Calls 3

readCodeMethod · 0.80
bytesLenMethod · 0.80
readFullMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…