Skip to content

Commit 6bd8d9c

Browse files
authored
README Fix: Added client variable initialisation (redis.NewClient) in quickstartExampleClient() (#1257)
* updated: readme quickstart
1 parent 68dd70b commit 6bd8d9c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ func ExampleNewClient() {
5656
}
5757

5858
func ExampleClient() {
59+
client := redis.NewClient(&redis.Options{
60+
Addr: "localhost:6379",
61+
Password: "", // no password set
62+
DB: 0, // use default DB
63+
})
5964
err := client.Set("key", "value", 0).Err()
6065
if err != nil {
6166
panic(err)

0 commit comments

Comments
 (0)