forked from mirror/redis
Merge pull request #1375 from mcg-web/patch-1
[DOC] Add ctx declaration in readme
This commit is contained in:
commit
5b4d00c217
|
@ -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",
|
||||||
|
|
Loading…
Reference in New Issue