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

Method NewList

cel/optimizer.go:413–415  ·  view source on GitHub ↗

NewList creates a list expression with a set of optional indices. Examples: [a, b] - elems: [a, b] - optIndices: [] [a, ?b, ?c] - elems: [a, b, c] - optIndices: [1, 2]

(elems []ast.Expr, optIndices []int32)

Source from the content-addressed store, hash-verified

411// - elems: [a, b, c]
412// - optIndices: [1, 2]
413func (opt *optimizerExprFactory) NewList(elems []ast.Expr, optIndices []int32) ast.Expr {
414 return opt.fac.NewList(opt.nextID(), elems, optIndices)
415}
416
417// NewMap creates a map from a set of entry expressions which contain a key and value expression.
418func (opt *optimizerExprFactory) NewMap(entries []ast.EntryExpr) ast.Expr {

Callers

nothing calls this directly

Calls 2

NewListMethod · 0.65
nextIDMethod · 0.45

Tested by

no test coverage detected