Skip to content

Commit

Permalink
README Fix: Added client variable initialisation (redis.NewClient) in…
Browse files Browse the repository at this point in the history
… quickstartExampleClient() (redis#1257)

* updated: readme quickstart
  • Loading branch information
tansawit authored Feb 11, 2020
1 parent 68dd70b commit 6bd8d9c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ func ExampleNewClient() {
}

func ExampleClient() {
client := redis.NewClient(&redis.Options{
Addr: "localhost:6379",
Password: "", // no password set
DB: 0, // use default DB
})
err := client.Set("key", "value", 0).Err()
if err != nil {
panic(err)
Expand Down

0 comments on commit 6bd8d9c

Please sign in to comment.