MCPcopy Create free account
hub / github.com/apache/fory / ReadInt32Slice

Method ReadInt32Slice

go/fory/reader.go:340–355  ·  view source on GitHub ↗

ReadInt32Slice reads []int32 with optional ref/type info

(refMode RefMode, readType bool)

Source from the content-addressed store, hash-verified

338
339// ReadInt32Slice reads []int32 with optional ref/type info
340func (c *ReadContext) ReadInt32Slice(refMode RefMode, readType bool) []int32 {
341 err := c.Err()
342 if refMode != RefModeNone {
343 if c.buffer.ReadInt8(err) == NullFlag {
344 return nil
345 }
346 }
347 if readType {
348 actual := TypeId(c.buffer.ReadUint8(err))
349 if actual != INT32_ARRAY {
350 c.SetError(TypeMismatchError(actual, INT32_ARRAY))
351 return nil
352 }
353 }
354 return ReadInt32Slice(c.buffer, err)
355}
356
357// ReadInt64Slice reads []int64 with optional ref/type info
358func (c *ReadContext) ReadInt64Slice(refMode RefMode, readType bool) []int64 {

Callers 2

readRemainingFieldMethod · 0.80
DeserializeFunction · 0.80

Calls 7

ErrMethod · 0.95
SetErrorMethod · 0.95
TypeMismatchErrorFunction · 0.85
ReadInt32SliceFunction · 0.85
ReadUint8Method · 0.80
TypeIdEnum · 0.50
ReadInt8Method · 0.45

Tested by

no test coverage detected