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

Method IsMap

policy/yaml.go:43–45  ·  view source on GitHub ↗

IsMap returns true if the YAML node is a map.

(node *yaml.Node)

Source from the content-addressed store, hash-verified

41
42// IsMap returns true if the YAML node is a map.
43func (YAMLHelper) IsMap(node *yaml.Node) bool {
44 return isTypeTag(node, yamlMap) && len(node.Content)%2 == 0
45}
46
47// RangeMap iterates over the map and calls the provided function for each key-value pair. If the
48// function returns false, the iteration will stop.

Callers 2

TestYAMLHelperFunction · 0.95
RangeMapMethod · 0.95

Calls 1

isTypeTagFunction · 0.85

Tested by 1

TestYAMLHelperFunction · 0.76