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

Method createBaseStep

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

Source from the content-addressed store, hash-verified

252}
253
254func (opt *ruleComposerImpl) createBaseStep(ctx *cel.OptimizerContext, returnList, hasOptionalOutput bool) compositionStep {
255 if returnList {
256 return newNonOptionalCompositionStep(ctx, ctx.NewLiteral(types.True), ctx.NewList([]ast.Expr{}, []int32{}))
257 }
258 if hasOptionalOutput {
259 return newOptionalCompositionStep(ctx, ctx.NewLiteral(types.True), ctx.NewCall("optional.none"))
260 }
261 return nil
262}
263
264func (opt *ruleComposerImpl) combineAggregate(ctx *cel.OptimizerContext, step, accumulatedStep compositionStep) compositionStep {
265 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