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

Method ProgramOptions

cel/library.go:725–734  ·  view source on GitHub ↗

ProgramOptions implements the Library interface method.

()

Source from the content-addressed store, hash-verified

723
724// ProgramOptions implements the Library interface method.
725func (lib *optionalLib) ProgramOptions() []ProgramOption {
726 opts := []ProgramOption{
727 CustomDecoratorV2(decorateOptionalOr),
728 }
729 if lib.version >= 3 {
730 opts = append(opts, CostTrackerOptions(
731 cost.OverloadTracker(optionalHasValueValueOverload, trackOptionalHasValue)))
732 }
733 return opts
734}
735
736// estimateOptionalHasValue estimates the cost of comparing an optional's value against the input
737// argument.

Callers

nothing calls this directly

Calls 3

OverloadTrackerFunction · 0.92
CostTrackerOptionsFunction · 0.85
CustomDecoratorV2Function · 0.70

Tested by

no test coverage detected