mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdctlv3: put should check error
This commit is contained in:
parent
fcf94f3a59
commit
b5d5bf625d
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user