(c byte)
| 19 | } |
| 20 | |
| 21 | func (d *Decoder) arrayLen(c byte) (int, error) { |
| 22 | if c == msgpcode.Nil { |
| 23 | return -1, nil |
| 24 | } else if c >= msgpcode.FixedArrayLow && c <= msgpcode.FixedArrayHigh { |
| 25 | return int(c & msgpcode.FixedArrayMask), nil |
| 26 | } |
| 27 | switch c { |
| 28 | case msgpcode.Array16: |
| 29 | n, err := d.uint16() |
| 30 | return int(n), err |
| 31 | case msgpcode.Array32: |
| 32 | n, err := d.uint32() |
| 33 | return int(n), err |
| 34 | } |
| 35 | return 0, fmt.Errorf("msgpack: invalid code=%x decoding array length", c) |
| 36 | } |
| 37 | |
| 38 | func decodeStringSliceValue(d *Decoder, v reflect.Value) error { |
| 39 | ptr := v.Addr().Convert(sliceStringPtrType).Interface().(*[]string) |
no test coverage detected