(b []byte, p unsafe.Pointer)
| 61 | } |
| 62 | |
| 63 | func (d decoder) decodeInt8(b []byte, p unsafe.Pointer) ([]byte, error) { |
| 64 | if hasNullPrefix(b) { |
| 65 | return b[4:], nil |
| 66 | } |
| 67 | |
| 68 | v, r, err := d.parseInt(b, int8Type) |
| 69 | if err != nil { |
| 70 | return r, err |
| 71 | } |
| 72 | |
| 73 | if v < math.MinInt8 || v > math.MaxInt8 { |
| 74 | return r, unmarshalOverflow(b[:len(b)-len(r)], int8Type) |
| 75 | } |
| 76 | |
| 77 | *(*int8)(p) = int8(v) |
| 78 | return r, nil |
| 79 | } |
| 80 | |
| 81 | func (d decoder) decodeInt16(b []byte, p unsafe.Pointer) ([]byte, error) { |
| 82 | if hasNullPrefix(b) { |
nothing calls this directly
no test coverage detected