MCPcopy Create free account
hub / github.com/cel-expr/cel-go / checkMapValid

Method checkMapValid

policy/parser.go:911–917  ·  view source on GitHub ↗
(ctx ParserContext, id int64, node *yaml.Node)

Source from the content-addressed store, hash-verified

909}
910
911func (p *parserImpl) checkMapValid(ctx ParserContext, id int64, node *yaml.Node) bool {
912 valid := len(node.Content)%2 == 0
913 if !valid {
914 ctx.ReportErrorAtID(id, "mismatched key-value pairs in map")
915 }
916 return valid
917}
918
919type yamlNodeType int
920

Callers 5

ParsePolicyMethod · 0.95
parseImportMethod · 0.95
ParseRuleMethod · 0.95
ParseVariableMethod · 0.95
ParseMatchMethod · 0.95

Calls 1

ReportErrorAtIDMethod · 0.65

Tested by

no test coverage detected