Merge pull request #1375 from mcg-web/patch-1

[DOC] Add ctx declaration in readme
This commit is contained in:
Vladimir Mihailenco 2020-06-14 14:39:57 +03:00 committed by GitHub
commit 5b4d00c217
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",