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

Function adaptToProto

cel/macro.go:566–575  ·  view source on GitHub ↗
(e ast.Expr)

Source from the content-addressed store, hash-verified

564}
565
566func adaptToProto(e ast.Expr) (*exprpb.Expr, *Error) {
567 if e == nil {
568 return nil, nil
569 }
570 out, err := ast.ExprToProto(e)
571 if err != nil {
572 return nil, wrapErr(e.ID(), "expr conversion failure", err)
573 }
574 return out, nil
575}
576
577func mustAdaptToProtoEntry(e ast.EntryExpr) *exprpb.Expr_CreateStruct_Entry {
578 out, _ := ast.EntryExprToProto(e)

Callers 7

HasMacroExpanderFunction · 0.85
ExistsMacroExpanderFunction · 0.85
ExistsOneMacroExpanderFunction · 0.85
MapMacroExpanderFunction · 0.85
FilterMacroExpanderFunction · 0.85
ExpanderMethod · 0.85
mustAdaptToProtoFunction · 0.85

Calls 3

ExprToProtoFunction · 0.92
wrapErrFunction · 0.85
IDMethod · 0.65

Tested by

no test coverage detected