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

Function exprStructField

common/ast/conversion.go:273–279  ·  view source on GitHub ↗
(factory ExprFactory, id int64, f *exprpb.Expr_CreateStruct_Entry)

Source from the content-addressed store, hash-verified

271}
272
273func exprStructField(factory ExprFactory, id int64, f *exprpb.Expr_CreateStruct_Entry) (EntryExpr, error) {
274 v, err := exprInternal(factory, f.GetValue())
275 if err != nil {
276 return nil, err
277 }
278 return factory.NewStructField(id, f.GetFieldKey(), v, f.GetOptionalEntry()), nil
279}
280
281// ExprToProto serializes an ast.Expr value to a protobuf Expr representation.
282func ExprToProto(e Expr) (*exprpb.Expr, error) {

Callers 2

ProtoToEntryExprFunction · 0.85
exprStructFunction · 0.85

Calls 3

exprInternalFunction · 0.85
GetValueMethod · 0.80
NewStructFieldMethod · 0.65

Tested by

no test coverage detected