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

Method NewObjectFieldInit

cel/macro.go:449–452  ·  view source on GitHub ↗

NewObjectFieldInit creates a new Object field initializer from the field name and value.

(field string, init *exprpb.Expr, optional bool)

Source from the content-addressed store, hash-verified

447
448// NewObjectFieldInit creates a new Object field initializer from the field name and value.
449func (ah *adaptingHelper) NewObjectFieldInit(field string, init *exprpb.Expr, optional bool) *exprpb.Expr_CreateStruct_Entry {
450 return mustAdaptToProtoEntry(
451 ah.modernHelper.NewStructField(field, mustAdaptToExpr(init), optional))
452}
453
454// Fold creates a fold comprehension instruction.
455//

Callers

nothing calls this directly

Calls 3

mustAdaptToProtoEntryFunction · 0.85
mustAdaptToExprFunction · 0.85
NewStructFieldMethod · 0.65

Tested by

no test coverage detected