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

Method ReadBoolSlice

go/fory/reader.go:286–301  ·  view source on GitHub ↗

ReadBoolSlice reads []bool with ref/type info

(refMode RefMode, readType bool)

Source from the content-addressed store, hash-verified

284
285// ReadBoolSlice reads []bool with ref/type info
286func (c *ReadContext) ReadBoolSlice(refMode RefMode, readType bool) []bool {
287 err := c.Err()
288 if refMode != RefModeNone {
289 if c.buffer.ReadInt8(err) == NullFlag {
290 return nil
291 }
292 }
293 if readType {
294 actual := TypeId(c.buffer.ReadUint8(err))
295 if actual != BOOL_ARRAY {
296 c.SetError(TypeMismatchError(actual, BOOL_ARRAY))
297 return nil
298 }
299 }
300 return ReadBoolSlice(c.buffer, err)
301}
302
303// ReadInt8Slice reads []int8 with optional ref/type info
304func (c *ReadContext) ReadInt8Slice(refMode RefMode, readType bool) []int8 {

Callers 2

readRemainingFieldMethod · 0.80
DeserializeFunction · 0.80

Calls 7

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

Tested by

no test coverage detected