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

Method Eval

cel/library.go:750–752  ·  view source on GitHub ↗

Eval evaluates the left-hand side optional to determine whether it contains a value, else proceeds with the right-hand side evaluation.

(ctx interpreter.Activation)

Source from the content-addressed store, hash-verified

748// Eval evaluates the left-hand side optional to determine whether it contains a value, else
749// proceeds with the right-hand side evaluation.
750func (opt *evalOptionalOr) Eval(ctx interpreter.Activation) ref.Val {
751 return opt.Exec(interpreter.AsFrame(ctx))
752}
753
754// evalOptionalOrValue selects between an optional or a concrete value. If the optional has a value,
755// its value is returned, otherwise the alternative value expression is evaluated and returned.

Callers

nothing calls this directly

Calls 2

ExecMethod · 0.95
AsFrameFunction · 0.92

Tested by

no test coverage detected