(b []byte, p unsafe.Pointer)
| 175 | } |
| 176 | |
| 177 | func (d decoder) decodeUint16(b []byte, p unsafe.Pointer) ([]byte, error) { |
| 178 | if hasNullPrefix(b) { |
| 179 | return b[4:], nil |
| 180 | } |
| 181 | |
| 182 | v, r, err := d.parseUint(b, uint16Type) |
| 183 | if err != nil { |
| 184 | return r, err |
| 185 | } |
| 186 | |
| 187 | if v > math.MaxUint16 { |
| 188 | return r, unmarshalOverflow(b[:len(b)-len(r)], uint16Type) |
| 189 | } |
| 190 | |
| 191 | *(*uint16)(p) = uint16(v) |
| 192 | return r, nil |
| 193 | } |
| 194 | |
| 195 | func (d decoder) decodeUint32(b []byte, p unsafe.Pointer) ([]byte, error) { |
| 196 | if hasNullPrefix(b) { |
nothing calls this directly
no test coverage detected