1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

chore: update example

This commit is contained in:
Vladimir Mihailenco
2022-10-05 10:06:54 +03:00
parent 1a38ccb80e
commit 2bcb060d6a
2 changed files with 16 additions and 7 deletions

View File

@ -278,9 +278,8 @@ func ExampleClient_ScanType() {
// Output: found 33 keys
}
// ExampleClient_ScanType_Type_Hash uses the KeyType "hash"
// Uses ScanType toZZ loop through lots of "keys" in Redis, 10 at a time, and add each key to a []string
func ExampleClient_ScanType_Type_Hash() {
// ExampleClient_ScanType_hashType uses the keyType "hash".
func ExampleClient_ScanType_hashType() {
rdb.FlushDB(ctx)
for i := 0; i < 33; i++ {
err := rdb.HSet(context.TODO(), fmt.Sprintf("key%d", i), "value", "foo").Err()