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

Function exprLiteral

common/ast/conversion.go:202–208  ·  view source on GitHub ↗
(factory ExprFactory, id int64, c *exprpb.Constant)

Source from the content-addressed store, hash-verified

200}
201
202func exprLiteral(factory ExprFactory, id int64, c *exprpb.Constant) (Expr, error) {
203 val, err := ConstantToVal(c)
204 if err != nil {
205 return nil, err
206 }
207 return factory.NewLiteral(id, val), nil
208}
209
210func exprIdent(factory ExprFactory, id int64, i *exprpb.Expr_Ident) (Expr, error) {
211 return factory.NewIdent(id, i.GetName()), nil

Callers 1

exprInternalFunction · 0.85

Calls 2

ConstantToValFunction · 0.85
NewLiteralMethod · 0.65

Tested by

no test coverage detected