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

Method ReadAndValidateTypeId

go/fory/reader.go:246–251  ·  view source on GitHub ↗

ReadAndValidateTypeId reads type ID and validates it matches expected

(expected TypeId)

Source from the content-addressed store, hash-verified

244
245// ReadAndValidateTypeId reads type ID and validates it matches expected
246func (c *ReadContext) ReadAndValidateTypeId(expected TypeId) {
247 actual := c.ReadTypeId()
248 if actual != expected {
249 c.SetError(TypeMismatchError(actual, expected))
250 }
251}
252
253// ReadCollectionLength reads a length value for collections.
254func (c *ReadContext) ReadCollectionLength() int {

Callers

nothing calls this directly

Calls 3

ReadTypeIdMethod · 0.95
SetErrorMethod · 0.95
TypeMismatchErrorFunction · 0.85

Tested by

no test coverage detected