Function
decodeByteArrayValue
(d *Decoder, v reflect.Value)
Source from the content-addressed store, hash-verified
| 171 | } |
| 172 | |
| 173 | func 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
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…