Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IN usage issues #79

Open
Hamper opened this issue Oct 20, 2017 · 4 comments
Open

IN usage issues #79

Hamper opened this issue Oct 20, 2017 · 4 comments

Comments

@Hamper
Copy link

Hamper commented Oct 20, 2017

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?

@pkumza
Copy link

pkumza commented Dec 14, 2017

+1

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

@guyannanfei25
Copy link

+1

@mb-14
Copy link

mb-14 commented Apr 9, 2018

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

@greglap
Copy link

greglap commented Jul 30, 2019

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants