Add ctx declaration in readme

This commit is contained in:
Jeremiah VALERIE 2020-06-14 12:45:37 +02:00 committed by GitHub
parent 789ee0484f
commit bebee12c80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -57,6 +57,13 @@ import "github.com/go-redis/redis/v8"
## Quickstart ## Quickstart
```go ```go
import (
"context"
"github.com/go-redis/redis/v8"
)
var ctx = context.Background()
func ExampleNewClient() { func ExampleNewClient() {
rdb := redis.NewClient(&redis.Options{ rdb := redis.NewClient(&redis.Options{
Addr: "localhost:6379", Addr: "localhost:6379",