ReadIntSlice reads []int with optional ref/type info
(refMode RefMode, readType bool)
| 428 | |
| 429 | // ReadIntSlice reads []int with optional ref/type info |
| 430 | func (c *ReadContext) ReadIntSlice(refMode RefMode, readType bool) []int { |
| 431 | err := c.Err() |
| 432 | if refMode != RefModeNone { |
| 433 | if c.buffer.ReadInt8(err) == NullFlag { |
| 434 | return nil |
| 435 | } |
| 436 | } |
| 437 | if readType { |
| 438 | actual := TypeId(c.buffer.ReadUint8(err)) |
| 439 | expected := TypeId(INT64_ARRAY) |
| 440 | if strconv.IntSize == 32 { |
| 441 | expected = INT32_ARRAY |
| 442 | } |
| 443 | if actual != expected { |
| 444 | c.SetError(TypeMismatchError(actual, expected)) |
| 445 | return nil |
| 446 | } |
| 447 | } |
| 448 | return ReadIntSlice(c.buffer, err) |
| 449 | } |
| 450 | |
| 451 | // ReadUintSlice reads []uint with optional ref/type info |
| 452 | func (c *ReadContext) ReadUintSlice(refMode RefMode, readType bool) []uint { |
no test coverage detected