Merge pull request #2 from jahfer/master

Fix the "Getting started" example for client.Set.
This commit is contained in:
Vladimir Mihailenco 2013-01-19 09:03:29 -08:00
commit d38d9a2e24
1 changed files with 7 additions and 2 deletions

View File

@ -32,10 +32,15 @@ Let's start with connecting to Redis:
Then we can start sending commands:
if err := client.Set("foo", "bar"); err != nil { panic(err) }
set := client.Set("foo", "bar");
if err := set.Err(); err != nil {
panic(set.Err())
}
get := client.Get("foo")
if err := get.Err(); err != nil { panic(err) }
if err := get.Err(); err != nil {
panic(err)
}
fmt.Println(get.Val())
We can also pipeline two commands together: