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

Function adaptToExpr

cel/macro.go:545–554  ·  view source on GitHub ↗
(e *exprpb.Expr)

Source from the content-addressed store, hash-verified

543}
544
545func adaptToExpr(e *exprpb.Expr) (ast.Expr, *Error) {
546 if e == nil {
547 return nil, nil
548 }
549 out, err := ast.ProtoToExpr(e)
550 if err != nil {
551 return nil, wrapErr(e.GetId(), "proto conversion failure", err)
552 }
553 return out, nil
554}
555
556func mustAdaptToEntryExpr(e *exprpb.Expr_CreateStruct_Entry) ast.EntryExpr {
557 out, _ := ast.ProtoToEntryExpr(e)

Callers 3

HasMacroExpanderFunction · 0.85
ExpanderMethod · 0.85
mustAdaptToExprFunction · 0.85

Calls 3

ProtoToExprFunction · 0.92
wrapErrFunction · 0.85
GetIdMethod · 0.65

Tested by

no test coverage detected