Merge pull request #4493 from xiang90/fix_ctl

etcdctlv3: put should check error
This commit is contained in:
Xiang Li 2016-02-11 15:03:34 -08:00
commit 56cc2d00df

View File

@ -71,6 +71,9 @@ func putCommandFunc(cmd *cobra.Command, args []string) {
}
req := &pb.PutRequest{Key: key, Value: value, Lease: id}
mustClient(cmd).KV.Put(context.Background(), req)
_, err = mustClient(cmd).KV.Put(context.Background(), req)
if err != nil {
ExitWithError(ExitError, err)
}
fmt.Printf("%s %s\n", key, value)
}