CreateNew creates new config with default values.
()
| 45 | |
| 46 | // CreateNew creates new config with default values. |
| 47 | func CreateNew() *Config { |
| 48 | c := &Config{ |
| 49 | Optimize: true, |
| 50 | ShortCircuit: true, |
| 51 | MaxNodes: DefaultMaxNodes, |
| 52 | ConstFns: make(map[string]reflect.Value), |
| 53 | Functions: make(map[string]*builtin.Function), |
| 54 | Builtins: make(map[string]*builtin.Function), |
| 55 | Disabled: make(map[string]bool), |
| 56 | } |
| 57 | for _, f := range builtin.Builtins { |
| 58 | c.Builtins[f.Name] = f |
| 59 | } |
| 60 | return c |
| 61 | } |
| 62 | |
| 63 | // New creates new config with environment. |
| 64 | func New(env any) *Config { |
no outgoing calls
searching dependent graphs…