From 4c504ab5281b124863474a04836b31ec0083ca3e Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Sun, 29 Sep 2013 11:55:26 +0300 Subject: [PATCH] Update examples. --- v2/example_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/v2/example_test.go b/v2/example_test.go index 2fa78fa..0aec570 100644 --- a/v2/example_test.go +++ b/v2/example_test.go @@ -16,8 +16,8 @@ func ExampleNewTCPClient() { defer client.Close() ping := client.Ping() - fmt.Println(ping.Err(), ping.Val()) - // Output: PONG + fmt.Println(ping.Val(), ping.Err()) + // Output: PONG } func ExampleNewUnixClient() { @@ -27,8 +27,8 @@ func ExampleNewUnixClient() { defer client.Close() ping := client.Ping() - fmt.Println(ping.Err(), ping.Val()) - // Output: PONG + fmt.Println(ping.Val(), ping.Err()) + // Output: PONG } func ExampleClient() { @@ -114,11 +114,11 @@ func ExampleMulti() { } else if err != nil { panic(err) } - fmt.Println(err, cmds) + fmt.Println(cmds, err) break } - // Output: [SET key 1: OK] + // Output: [SET key 1: OK] } 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) }