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

Function exprList

common/ast/conversion.go:214–224  ·  view source on GitHub ↗
(factory ExprFactory, id int64, l *exprpb.Expr_CreateList)

Source from the content-addressed store, hash-verified

212}
213
214func exprList(factory ExprFactory, id int64, l *exprpb.Expr_CreateList) (Expr, error) {
215 elems := make([]Expr, len(l.GetElements()))
216 for i, e := range l.GetElements() {
217 elem, err := exprInternal(factory, e)
218 if err != nil {
219 return nil, err
220 }
221 elems[i] = elem
222 }
223 return factory.NewList(id, elems, l.GetOptionalIndices()), nil
224}
225
226func exprMap(factory ExprFactory, id int64, s *exprpb.Expr_CreateStruct) (Expr, error) {
227 entries := make([]EntryExpr, len(s.GetEntries()))

Callers 1

exprInternalFunction · 0.85

Calls 2

exprInternalFunction · 0.85
NewListMethod · 0.65

Tested by

no test coverage detected