From 5ba7d4d883ae099ba9c8cc13bdb1526b1361e0c9 Mon Sep 17 00:00:00 2001 From: yaziming Date: Tue, 7 Jul 2020 14:26:24 +0800 Subject: [PATCH] fix-scan-error --- backend/database/redis.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/database/redis.go b/backend/database/redis.go index 12687368..e87b688f 100644 --- a/backend/database/redis.go +++ b/backend/database/redis.go @@ -125,9 +125,10 @@ func (r *Redis) HScan(collection string) (results []string, err error) { if err != nil { return results, err } - - results = append(results, items[1]) - + for i := 0; i < len(items); i += 2 { + cur := items[i+1] + results = append(results, cur) + } if cursor == 0 { break }