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

Method createBaseStep

policy/composer.go:259–267  ·  view source on GitHub ↗
(ctx *cel.OptimizerContext, returnList, hasOptionalOutput bool)

Source from the content-addressed store, hash-verified

257}
258
259func (opt *ruleComposerImpl) createBaseStep(ctx *cel.OptimizerContext, returnList, hasOptionalOutput bool) compositionStep {
260 if returnList {
261 return newNonOptionalCompositionStep(ctx, ctx.NewLiteral(types.True), ctx.NewList([]ast.Expr{}, []int32{}))
262 }
263 if hasOptionalOutput {
264 return newOptionalCompositionStep(ctx, ctx.NewLiteral(types.True), ctx.NewCall("optional.none"))
265 }
266 return nil
267}
268
269func (opt *ruleComposerImpl) combineAggregate(ctx *cel.OptimizerContext, step, accumulatedStep compositionStep) compositionStep {
270 trueCondition := ctx.NewLiteral(types.True)

Callers 1

optimizeRuleMethod · 0.95

Calls 5

NewLiteralMethod · 0.65
NewListMethod · 0.65
NewCallMethod · 0.65

Tested by

no test coverage detected