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

Method NewList

cel/optimizer.go:407–409  ·  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

405// - elems: [a, b, c]
406// - optIndices: [1, 2]
407func (opt *optimizerExprFactory) NewList(elems []ast.Expr, optIndices []int32) ast.Expr {
408 return opt.fac.NewList(opt.nextID(), elems, optIndices)
409}
410
411// NewMap creates a map from a set of entry expressions which contain a key and value expression.
412func (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