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

Method FoldKeyOnly

interpreter/interpretable.go:2013–2015  ·  view source on GitHub ↗

FoldKeyOnly reports whether the folder only consumes the entry key (e.g. 1-variable map comprehensions where iterVar2 is empty and listV1Fold is false).

()

Source from the content-addressed store, hash-verified

2011// FoldKeyOnly reports whether the folder only consumes the entry key (e.g. 1-variable map
2012// comprehensions where iterVar2 is empty and listV1Fold is false).
2013func (f *folder) FoldKeyOnly() bool {
2014 return f.iterVar2 == "" && !f.listV1Fold
2015}
2016
2017// FoldEntry will either fold comprehension v1 style macros if iterVar2 is unset, or comprehension v2 style
2018// macros if both the iterVar and iterVar2 are set to non-empty strings.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected