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

Function IntArg

common/cost/model.go:271–273  ·  view source on GitHub ↗

IntArg creates an expression referencing the integer value of the argument at the given index. At runtime, an argument which is not an integer reads as defaultVal, and a negative integer reads as 0. When estimating, a literal argument reads as its value, and a non-literal argument is unbounded from

(index int, defaultVal uint64)

Source from the content-addressed store, hash-verified

269// as 0. When estimating, a literal argument reads as its value, and a non-literal argument is
270// unbounded from model version 1 (or FixedSizeEstimate(defaultVal) at version 0).
271func IntArg(index int, defaultVal uint64) QuantityExpr {
272 return intArgExpr{index: index, defaultVal: defaultVal}
273}
274
275// targetExpr represents the size of the receiver/target object.
276type targetExpr struct{}

Callers 12

stringSubstringCostModelFunction · 0.92
listSliceCostModelFunction · 0.92
listsRangeCostModelFunction · 0.92
TestVersion1RevisionsFunction · 0.85
TestQuantityExprs_TrackFunction · 0.85

Calls

no outgoing calls