Update examples.

This commit is contained in:
Vladimir Mihailenco 2013-09-29 11:55:26 +03:00
parent de7a9d3142
commit 4c504ab528
1 changed files with 8 additions and 8 deletions

View File

@ -16,8 +16,8 @@ func ExampleNewTCPClient() {
defer client.Close()
ping := client.Ping()
fmt.Println(ping.Err(), ping.Val())
// Output: <nil> PONG
fmt.Println(ping.Val(), ping.Err())
// Output: PONG <nil>
}
func ExampleNewUnixClient() {
@ -27,8 +27,8 @@ func ExampleNewUnixClient() {
defer client.Close()
ping := client.Ping()
fmt.Println(ping.Err(), ping.Val())
// Output: <nil> PONG
fmt.Println(ping.Val(), ping.Err())
// Output: PONG <nil>
}
func ExampleClient() {
@ -114,11 +114,11 @@ func ExampleMulti() {
} else if err != nil {
panic(err)
}
fmt.Println(err, cmds)
fmt.Println(cmds, err)
break
}
// Output: <nil> [SET key 1: OK]
// Output: [SET key 1: OK] <nil>
}
func ExamplePubSub() {
@ -159,6 +159,6 @@ func Example_customCommand() {
defer client.Close()
get := Get(client, "key_does_not_exist")
fmt.Println(get.Err(), get.Val())
// Output: (nil)
fmt.Printf("%q %s", get.Val(), get.Err())
// Output: "" (nil)
}