diff --git a/dsl/matcher.go b/dsl/matcher.go index 563816177..4669f85f0 100644 --- a/dsl/matcher.go +++ b/dsl/matcher.go @@ -251,9 +251,10 @@ func match(srcType reflect.Type, params params) Matcher { case reflect.Bool: return Like(true) case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, - reflect.Float32, reflect.Float64: + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: return Like(1) + case reflect.Float32, reflect.Float64: + return Like(1.1) default: panic(fmt.Sprintf("match: unhandled type: %v", srcType)) } diff --git a/dsl/matcher_test.go b/dsl/matcher_test.go index d0811310f..a66426f70 100644 --- a/dsl/matcher_test.go +++ b/dsl/matcher_test.go @@ -684,14 +684,14 @@ func TestMatch(t *testing.T) { args: args{ src: float32(1), }, - want: Like(1), + want: Like(1.1), }, { name: "base case - float64", args: args{ src: float64(1), }, - want: Like(1), + want: Like(1.1), }, { name: "error - unhandled type",