doc: pass ctx in example for infinite wait time (#2540)

Co-authored-by: Monkey <golang@88.com>
This commit is contained in:
Pranit Bauva 2023-04-05 21:46:26 +05:30 committed by GitHub
parent 842b65fb60
commit a42ba14851
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ func ExampleClient_BLPop() {
panic(err)
}
// use `rdb.BLPop(0, "queue")` for infinite waiting time
// use `rdb.BLPop(ctx, 0, "queue")` for infinite waiting time
result, err := rdb.BLPop(ctx, 1*time.Second, "queue").Result()
if err != nil {
panic(err)