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

Method NewStructField

cel/optimizer.go:480–482  ·  view source on GitHub ↗

NewStructField creates a struct field initialization. Examples: {count: 3u} - field: count - value: 3u - optional: false {?count: x} - field: count - value: x - optional: true

(field string, value ast.Expr, isOptional bool)

Source from the content-addressed store, hash-verified

478// - value: x
479// - optional: true
480func (opt *optimizerExprFactory) NewStructField(field string, value ast.Expr, isOptional bool) ast.EntryExpr {
481 return opt.fac.NewStructField(opt.nextID(), field, value, isOptional)
482}
483
484// UpdateExpr updates the target expression with the updated content while preserving macro metadata.
485//

Callers

nothing calls this directly

Calls 2

NewStructFieldMethod · 0.65
nextIDMethod · 0.45

Tested by

no test coverage detected