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

Function NewVariableWithDoc

common/env/env.go:249–251  ·  view source on GitHub ↗

NewVariableWithDoc returns a serializable variable from a name, type definition, and doc string.

(name string, t *TypeDesc, doc string)

Source from the content-addressed store, hash-verified

247
248// NewVariableWithDoc returns a serializable variable from a name, type definition, and doc string.
249func NewVariableWithDoc(name string, t *TypeDesc, doc string) *Variable {
250 return &Variable{Name: name, TypeDesc: t, Description: doc}
251}
252
253// Variable represents a typed variable declaration which will be published via the
254// cel.VariableDecls() option.

Callers 3

NewVariableFunction · 0.70
TestConfigFunction · 0.70

Calls

no outgoing calls

Tested by 2

TestConfigFunction · 0.56