We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a1ca29 commit bbe11e0Copy full SHA for bbe11e0
internal/evaluator/expression.go
@@ -17,13 +17,19 @@ func (e Expression) String() string {
17
return string(e)
18
}
19
20
+type ExprParam map[string]interface{}
21
+
22
+func (m ExprParam) Split(s, sep string) []string {
23
+ return strings.Split(s, sep)
24
+}
25
26
func (e Expression) EvaluateWithVars(params map[string]interface{}) (interface{}, error) {
27
program, err := expr.Compile(e.String())
28
if err != nil {
29
return nil, fmt.Errorf("invalid expression: %w", err)
30
31
- env := make(map[string]interface{})
32
+ env := make(ExprParam)
33
34
for _, c := range program.Constants {
35
if reflect.TypeOf(c).Kind() == reflect.String {
0 commit comments