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

Method NewStruct

common/ast/factory.go:72–72  ·  view source on GitHub ↗

NewStruct creates an Expr value representing a struct literal with a given type name and a set of field initializers.

(id int64, typeName string, fields []EntryExpr)

Source from the content-addressed store, hash-verified

70 // NewStruct creates an Expr value representing a struct literal with a given type name and a
71 // set of field initializers.
72 NewStruct(id int64, typeName string, fields []EntryExpr) Expr
73
74 // NewStructField creates a StructField with a given field name, value, and a flag indicating
75 // whether the field is optionally set.

Callers 14

TestConvertExprFunction · 0.95
TestSetKindCaseFunction · 0.95
TestStructFunction · 0.95
checkCreateStructMethod · 0.65
adaptLiteralFunction · 0.65
NewObjectMethod · 0.65
zeroValueExprFunction · 0.65
NewStructMethod · 0.65
testCreateStructFunction · 0.65

Implementers 1

baseExprFactorycommon/ast/factory.go

Calls

no outgoing calls

Tested by 7

TestConvertExprFunction · 0.76
TestSetKindCaseFunction · 0.76
TestStructFunction · 0.76
testCreateStructFunction · 0.52
jsonStructFunction · 0.52