PaesslerAG/gval

evaluate with operator in value not expected

Closed this issue · 1 comments

that is code:

package main

import (
	"fmt"

	"github.com/PaesslerAG/gval"
)

func main() {

	value, err := gval.Evaluate(`foo in [100, 101]`, map[string]interface{}{
		"foo": 100,
	})
	if err != nil {
		fmt.Println(err)
	}

	fmt.Print(value)

}

it expect be true, but get false

gval uses float64 and "foo": 100 is an int