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

Method NewStruct

cel/optimizer.go:463–465  ·  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

461// - typeName: pkg.TypeName
462// - fields: [{field: value}]
463func (opt *optimizerExprFactory) NewStruct(typeName string, fields []ast.EntryExpr) ast.Expr {
464 return opt.fac.NewStruct(opt.nextID(), typeName, fields)
465}
466
467// NewStructField creates a struct field initialization.
468//

Callers

nothing calls this directly

Calls 2

NewStructMethod · 0.65
nextIDMethod · 0.45

Tested by

no test coverage detected