1
0
mirror of https://github.com/redis/go-redis.git synced 2025-08-01 16:06:54 +03:00

Speedup ScanSlice

This commit is contained in:
Vladimir Mihailenco
2017-06-02 16:19:43 +03:00
parent 3802e09b42
commit f29951c899
3 changed files with 19 additions and 2 deletions

View File

@ -122,7 +122,7 @@ func ScanSlice(data []string, slice interface{}) error {
for i, s := range data {
elem := internal.SliceNextElem(v)
if err := Scan([]byte(s), elem.Addr().Interface()); err != nil {
if err := Scan(internal.StringToBytes(s), elem.Addr().Interface()); err != nil {
return fmt.Errorf("redis: ScanSlice(index=%d value=%q) failed: %s", i, s, err)
}
}