govaluate
govaluate copied to clipboard
IN usage issues
Some simple tests:
'test' in ('test','')
- work fine
'test' in ('test')
- error: Value 'test' cannot be used with the comparator 'in', it is not a number
'test' in test
with parameters govaluate.MapParameters{"test": []string{"test"}}
- Value '[test]' cannot be used with the comparator 'in', it is not a number
'test' in test
with parameters govaluate.MapParameters{"test": "('test','')"
- Value '('test','')' cannot be used with the comparator 'in', it is not a number
How to use 'IN' operator with array parameters?
+1
I have the same question as I cannot create an array which holds only one item.
+1
It works if I pass the array parameter as a []interface{}
instead of a []string
+1