From 59ae8ffc48127be04b7b981e59e85577e15a8981 Mon Sep 17 00:00:00 2001 From: Minh Nguyen Date: Fri, 25 Mar 2022 14:54:28 +0700 Subject: [PATCH] fix-scan-redis --- get_with_prefix_pattern.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/get_with_prefix_pattern.go b/get_with_prefix_pattern.go index 628ca9c..13c2b98 100644 --- a/get_with_prefix_pattern.go +++ b/get_with_prefix_pattern.go @@ -6,7 +6,7 @@ import ( ) // GetWithPrefixPattern ... -func GetWithPrefixPattern(pattern string, limit int64) (keys []string, values []string) { +func GetWithPrefixPattern(pattern string) (keys []string, values []string) { // Init keys = make([]string, 0) values = make([]string, 0) @@ -17,9 +17,8 @@ func GetWithPrefixPattern(pattern string, limit int64) (keys []string, values [] err error ) - keys, cursor, err = rdb.Scan(ctx, cursor, pattern, limit).Result() + keys, cursor, err = rdb.Scan(ctx, cursor, pattern, 1000000).Result() if err != nil { - fmt.Println("err redis scan: ", err.Error()) return }