Skip to content

Commit 113618c

Browse files
DOC-4449 fixed bugs in tests
1 parent 500c648 commit 113618c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doctests/cmds_hash_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func ExampleClient_hset() {
8383

8484
sort.Slice(keys, func(i, j int) bool { return i < j })
8585

86-
for key, _ := range res6 {
86+
for _, key := range keys {
8787
fmt.Printf("Key: %v, value: %v\n", key, res6[key])
8888
}
8989
// >>> Key: field1, value: Hello
@@ -186,7 +186,7 @@ func ExampleClient_hgetall() {
186186

187187
sort.Slice(keys, func(i, j int) bool { return i < j })
188188

189-
for key, _ := range hGetAllResult2 {
189+
for _, key := range keys {
190190
fmt.Printf("Key: %v, value: %v\n", key, hGetAllResult2[key])
191191
}
192192
// >>> Key: field1, value: Hello

0 commit comments

Comments
 (0)