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

Method ReadInt8Slice

go/fory/reader.go:304–319  ·  view source on GitHub ↗

ReadInt8Slice reads []int8 with optional ref/type info

(refMode RefMode, readType bool)

Source from the content-addressed store, hash-verified

302
303// ReadInt8Slice reads []int8 with optional ref/type info
304func (c *ReadContext) ReadInt8Slice(refMode RefMode, readType bool) []int8 {
305 err := c.Err()
306 if refMode != RefModeNone {
307 if c.buffer.ReadInt8(err) == NullFlag {
308 return nil
309 }
310 }
311 if readType {
312 actual := TypeId(c.buffer.ReadUint8(err))
313 if actual != INT8_ARRAY {
314 c.SetError(TypeMismatchError(actual, INT8_ARRAY))
315 return nil
316 }
317 }
318 return ReadInt8Slice(c.buffer, err)
319}
320
321// ReadInt16Slice reads []int16 with optional ref/type info
322func (c *ReadContext) ReadInt16Slice(refMode RefMode, readType bool) []int16 {

Callers 2

readRemainingFieldMethod · 0.80
DeserializeFunction · 0.80

Calls 7

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

Tested by

no test coverage detected