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

Method ReadUint32Slice

go/fory/reader.go:394–409  ·  view source on GitHub ↗

ReadUint32Slice reads []uint32 with optional ref/type info

(refMode RefMode, readType bool)

Source from the content-addressed store, hash-verified

392
393// ReadUint32Slice reads []uint32 with optional ref/type info
394func (c *ReadContext) ReadUint32Slice(refMode RefMode, readType bool) []uint32 {
395 err := c.Err()
396 if refMode != RefModeNone {
397 if c.buffer.ReadInt8(err) == NullFlag {
398 return nil
399 }
400 }
401 if readType {
402 actual := TypeId(c.buffer.ReadUint8(err))
403 if actual != UINT32_ARRAY {
404 c.SetError(TypeMismatchError(actual, UINT32_ARRAY))
405 return nil
406 }
407 }
408 return ReadUint32Slice(c.buffer, err)
409}
410
411// ReadUint64Slice reads []uint64 with optional ref/type info
412func (c *ReadContext) ReadUint64Slice(refMode RefMode, readType bool) []uint64 {

Callers 1

readRemainingFieldMethod · 0.80

Calls 7

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

Tested by

no test coverage detected