MCPcopy Create free account
hub / github.com/brimdata/super / checkEnum

Function checkEnum

value.go:521–526  ·  view source on GitHub ↗
(typ *TypeEnum, body scode.Bytes)

Source from the content-addressed store, hash-verified

519}
520
521func checkEnum(typ *TypeEnum, body scode.Bytes) error {
522 if selector := DecodeUint(body); int(selector) >= len(typ.Symbols) {
523 return errors.New("enum selector out of range")
524 }
525 return nil
526}

Callers 1

ValidateMethod · 0.85

Calls 2

DecodeUintFunction · 0.85
NewMethod · 0.80

Tested by

no test coverage detected