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

Method maybeUnwrapDynCall

checker/cost.go:595–605  ·  view source on GitHub ↗
(e ast.Expr)

Source from the content-addressed store, hash-verified

593}
594
595func (c *coster) maybeUnwrapDynCall(e ast.Expr) *CostEstimate {
596 call := e.AsCall()
597 if call.FunctionName() != "dyn" {
598 return nil
599 }
600 arg := call.Args()[0]
601 argCost := c.cost(arg)
602 c.copySizeEstimates(e, arg)
603 callCost := FixedCostEstimate(1).Add(argCost)
604 return &callCost
605}
606
607func (c *coster) costCreateList(e ast.Expr) CostEstimate {
608 create := e.AsList()

Callers 1

costCallMethod · 0.95

Calls 7

costMethod · 0.95
copySizeEstimatesMethod · 0.95
FixedCostEstimateFunction · 0.85
AsCallMethod · 0.65
FunctionNameMethod · 0.65
ArgsMethod · 0.65
AddMethod · 0.65

Tested by

no test coverage detected