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

Method ConditionalAttribute

interpreter/attributes.go:190–199  ·  view source on GitHub ↗

ConditionalAttribute supports the case where an attribute selection may occur on a conditional expression, e.g. (cond ? a : b).c

(id int64, expr Interpretable, t, f Attribute)

Source from the content-addressed store, hash-verified

188// ConditionalAttribute supports the case where an attribute selection may occur on a conditional
189// expression, e.g. (cond ? a : b).c
190func (r *attrFactory) ConditionalAttribute(id int64, expr Interpretable, t, f Attribute) Attribute {
191 return &conditionalAttribute{
192 id: id,
193 expr: adaptToV2(expr),
194 truthy: t,
195 falsy: f,
196 adapter: r.adapter,
197 fac: r,
198 }
199}
200
201// MaybeAttribute collects variants of unchecked AbsoluteAttribute values which could either be
202// direct variable accesses or some combination of variable access with qualification.

Callers

nothing calls this directly

Calls 1

adaptToV2Function · 0.85

Tested by

no test coverage detected