govaluate icon indicating copy to clipboard operation
govaluate copied to clipboard

IN usage issues

Open Hamper opened this issue 6 years ago • 4 comments

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?

Hamper avatar Oct 20 '17 16:10 Hamper

+1

I have the same question as I cannot create an array which holds only one item.

pkumza avatar Dec 14 '17 17:12 pkumza

+1

guyannanfei25 avatar Dec 29 '17 07:12 guyannanfei25

It works if I pass the array parameter as a []interface{} instead of a []string

mb-14 avatar Apr 09 '18 12:04 mb-14

+1

greglap avatar Jul 30 '19 20:07 greglap