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

Method checkMapValid

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

Source from the content-addressed store, hash-verified

965}
966
967func (p *parserImpl) checkMapValid(ctx ParserContext, id int64, node *yaml.Node) bool {
968 valid := len(node.Content)%2 == 0
969 if !valid {
970 ctx.ReportErrorAtID(id, "mismatched key-value pairs in map")
971 }
972 return valid
973}
974
975type yamlNodeType int
976

Callers 5

ParsePolicyMethod · 0.95
parseImportMethod · 0.95
ParseRuleMethod · 0.95
ParseVariableMethod · 0.95
parseMatchInternalMethod · 0.95

Calls 1

ReportErrorAtIDMethod · 0.65

Tested by

no test coverage detected