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

Function exprSelect

common/ast/conversion.go:250–259  ·  view source on GitHub ↗
(factory ExprFactory, id int64, s *exprpb.Expr_Select)

Source from the content-addressed store, hash-verified

248}
249
250func exprSelect(factory ExprFactory, id int64, s *exprpb.Expr_Select) (Expr, error) {
251 op, err := exprInternal(factory, s.GetOperand())
252 if err != nil {
253 return nil, err
254 }
255 if s.GetTestOnly() {
256 return factory.NewPresenceTest(id, op, s.GetField()), nil
257 }
258 return factory.NewSelect(id, op, s.GetField()), nil
259}
260
261func exprStruct(factory ExprFactory, id int64, s *exprpb.Expr_CreateStruct) (Expr, error) {
262 fields := make([]EntryExpr, len(s.GetEntries()))

Callers 1

exprInternalFunction · 0.85

Calls 3

exprInternalFunction · 0.85
NewPresenceTestMethod · 0.65
NewSelectMethod · 0.65

Tested by

no test coverage detected