Env specifies expected input of env for type checks. If struct is passed, all fields will be treated as variables, as well as all fields of embedded structs and struct itself. If map is passed, all items will be treated as variables. Methods defined on this type will be available as functions.
(env any)
| 27 | // If map is passed, all items will be treated as variables. |
| 28 | // Methods defined on this type will be available as functions. |
| 29 | func Env(env any) Option { |
| 30 | return func(c *conf.Config) { |
| 31 | c.WithEnv(env) |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | // AllowUndefinedVariables allows to use undefined variables inside expressions. |
| 36 | // This can be used with expr.Env option to partially define a few variables. |