Skip to content

Commit a42ba14

Browse files
doc: pass ctx in example for infinite wait time (#2540)
Co-authored-by: Monkey <[email protected]>
1 parent 842b65f commit a42ba14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

example_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ func ExampleClient_BLPop() {
227227
panic(err)
228228
}
229229

230-
// use `rdb.BLPop(0, "queue")` for infinite waiting time
230+
// use `rdb.BLPop(ctx, 0, "queue")` for infinite waiting time
231231
result, err := rdb.BLPop(ctx, 1*time.Second, "queue").Result()
232232
if err != nil {
233233
panic(err)

0 commit comments

Comments
 (0)