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

Function NewVariable

common/decls/decls.go:1033–1035  ·  view source on GitHub ↗

NewVariable creates a new variable declaration.

(name string, t *types.Type)

Source from the content-addressed store, hash-verified

1031
1032// NewVariable creates a new variable declaration.
1033func NewVariable(name string, t *types.Type) *VariableDecl {
1034 return &VariableDecl{name: name, varType: t}
1035}
1036
1037// NewVariableWithDoc creates a new variable declaration with usage documentation.
1038func NewVariableWithDoc(name string, t *types.Type, doc string) *VariableDecl {

Callers 15

ParsePolicyVariablesFunction · 0.92
compileRuleMethod · 0.92
TestRuntimeCostFunction · 0.92
testDataFunction · 0.92
resolveTypeIdentMethod · 0.92
lookupGlobalIdentMethod · 0.92

Calls

no outgoing calls

Tested by 15

ParsePolicyVariablesFunction · 0.74
TestRuntimeCostFunction · 0.74
testDataFunction · 0.74
testCasesFunction · 0.74
testEnvsFunction · 0.74
TestVarsInheritanceFunction · 0.74