(b []byte, p unsafe.Pointer)
| 157 | } |
| 158 | |
| 159 | func (d decoder) decodeUint8(b []byte, p unsafe.Pointer) ([]byte, error) { |
| 160 | if hasNullPrefix(b) { |
| 161 | return b[4:], nil |
| 162 | } |
| 163 | |
| 164 | v, r, err := d.parseUint(b, uint8Type) |
| 165 | if err != nil { |
| 166 | return r, err |
| 167 | } |
| 168 | |
| 169 | if v > math.MaxUint8 { |
| 170 | return r, unmarshalOverflow(b[:len(b)-len(r)], uint8Type) |
| 171 | } |
| 172 | |
| 173 | *(*uint8)(p) = uint8(v) |
| 174 | return r, nil |
| 175 | } |
| 176 | |
| 177 | func (d decoder) decodeUint16(b []byte, p unsafe.Pointer) ([]byte, error) { |
| 178 | if hasNullPrefix(b) { |
nothing calls this directly
no test coverage detected