mirror of
https://github.com/redis/go-redis.git
synced 2025-07-29 17:41:15 +03:00
Fix slice next elem func
This commit is contained in:
@ -120,8 +120,9 @@ func ScanSlice(data []string, slice interface{}) error {
|
||||
return fmt.Errorf("redis: ScanSlice(non-slice %T)", slice)
|
||||
}
|
||||
|
||||
next := internal.MakeSliceNextElemFunc(v)
|
||||
for i, s := range data {
|
||||
elem := internal.SliceNextElem(v)
|
||||
elem := next()
|
||||
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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user