Get data by pattern #1

Merged
milano15662 merged 4 commits from get-data-by-pattern into master 2022-03-25 10:10:05 +00:00
1 changed files with 2 additions and 3 deletions
Showing only changes of commit 59ae8ffc48 - Show all commits

View File

@ -6,7 +6,7 @@ import (
) )
// GetWithPrefixPattern ... // GetWithPrefixPattern ...
func GetWithPrefixPattern(pattern string, limit int64) (keys []string, values []string) { func GetWithPrefixPattern(pattern string) (keys []string, values []string) {
// Init // Init
keys = make([]string, 0) keys = make([]string, 0)
values = make([]string, 0) values = make([]string, 0)
@ -17,9 +17,8 @@ func GetWithPrefixPattern(pattern string, limit int64) (keys []string, values []
err error 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 { if err != nil {
fmt.Println("err redis scan: ", err.Error())
return return
} }