Skip to content

Commit 5256331

Browse files
author
Avital-Fine
committed
Merge branch 'VecSim' of github.com:Avital-Fine/redisearch-go into VecSim
2 parents 2293166 + 5a2abb1 commit 5256331

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

redisearch/query.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package redisearch
22

33
import (
4+
"fmt"
45
"math"
56

67
"github.com/gomodule/redigo/redis"
@@ -252,7 +253,7 @@ func appendNumArgs(num float64, exclude bool, args redis.Args) redis.Args {
252253
}
253254

254255
if exclude {
255-
return append(args, "(", num)
256+
return append(args, fmt.Sprint("(", num))
256257
}
257258
return append(args, num)
258259
}

redisearch/query_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ func Test_appendNumArgs(t *testing.T) {
152152
want redis.Args
153153
}{
154154
{"1 arg", args{1.0, false, redis.Args{}}, redis.Args{1.0}},
155-
{"1 excluded arg", args{1.0, true, redis.Args{}}, redis.Args{"(", 1.0}},
155+
{"2.54 excluded arg", args{2.54, true, redis.Args{}}, redis.Args{"(2.54"}},
156156
{"+inf", args{math.Inf(1), false, redis.Args{}}, redis.Args{"+inf"}},
157157
{"+inf", args{math.Inf(-1), false, redis.Args{}}, redis.Args{"-inf"}},
158158
}

0 commit comments

Comments
 (0)