VariableWithDoc creates an instance of a variable declaration with a variable name, type, and doc string.
(name string, t *Type, doc string)
| 147 | |
| 148 | // VariableWithDoc creates an instance of a variable declaration with a variable name, type, and doc string. |
| 149 | func VariableWithDoc(name string, t *Type, doc string) EnvOption { |
| 150 | return func(e *Env) (*Env, error) { |
| 151 | e.variables = append(e.variables, decls.NewVariableWithDoc(name, t, doc)) |
| 152 | return e, nil |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | // VariableDecls configures a set of fully defined cel.VariableDecl instances in the environment. |
| 157 | func VariableDecls(vars ...*decls.VariableDecl) EnvOption { |