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

Method NewStruct

cel/optimizer.go:469–471  ·  view source on GitHub ↗

NewStruct creates a new typed struct value with an set of field initializations. Example: pkg.TypeName{field: value} - typeName: pkg.TypeName - fields: [{field: value}]

(typeName string, fields []ast.EntryExpr)

Source from the content-addressed store, hash-verified

467// - typeName: pkg.TypeName
468// - fields: [{field: value}]
469func (opt *optimizerExprFactory) NewStruct(typeName string, fields []ast.EntryExpr) ast.Expr {
470 return opt.fac.NewStruct(opt.nextID(), typeName, fields)
471}
472
473// NewStructField creates a struct field initialization.
474//

Callers

nothing calls this directly

Calls 2

NewStructMethod · 0.65
nextIDMethod · 0.45

Tested by

no test coverage detected