clientv3: fix typo in README

Fix https://github.com/coreos/etcd/issues/7337
release-3.2
yiyiyaya 2017-02-17 10:54:05 +08:00 committed by Gyu-Ho Lee
parent 2ac44eab81
commit 56b4e6b71f
1 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ pass `context.WithTimeout` to APIs:
```go
ctx, cancel := context.WithTimeout(context.Background(), timeout)
resp, err := kvc.Put(ctx, "sample_key", "sample_value")
resp, err := cli.Put(ctx, "sample_key", "sample_value")
cancel()
if err != nil {
// handle error!
@ -57,7 +57,7 @@ etcd client returns 2 types of errors:
Here is the example code to handle client errors:
```go
resp, err := kvc.Put(ctx, "", "")
resp, err := cli.Put(ctx, "", "")
if err != nil {
switch err {
case context.Canceled: