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

Method ConditionalAttribute

interpreter/attributes.go:207–216  ·  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

205// ConditionalAttribute supports the case where an attribute selection may occur on a conditional
206// expression, e.g. (cond ? a : b).c
207func (r *attrFactory) ConditionalAttribute(id int64, expr Interpretable, t, f Attribute) Attribute {
208 return &conditionalAttribute{
209 id: id,
210 expr: adaptToV2(expr),
211 truthy: t,
212 falsy: f,
213 adapter: r.adapter,
214 fac: r,
215 }
216}
217
218// MaybeAttribute collects variants of unchecked AbsoluteAttribute values which could either be
219// 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