mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdcdtl: use new lease interface
This commit is contained in:
@@ -148,13 +148,12 @@ func leaseKeepAliveCommandFunc(cmd *cobra.Command, args []string) {
|
||||
}
|
||||
|
||||
id := leaseFromArgs(args[0])
|
||||
respc, kerr := mustClientFromCmd(cmd).KeepAlive(context.TODO(), id)
|
||||
if kerr != nil {
|
||||
ExitWithError(ExitBadConnection, kerr)
|
||||
}
|
||||
|
||||
respc := mustClientFromCmd(cmd).KeepAlive(context.TODO(), id)
|
||||
for resp := range respc {
|
||||
display.KeepAlive(*resp)
|
||||
if resp.Err != nil {
|
||||
ExitWithError(ExitError, resp.Err)
|
||||
}
|
||||
display.KeepAlive(resp)
|
||||
}
|
||||
|
||||
if _, ok := (display).(*simplePrinter); ok {
|
||||
|
||||
Reference in New Issue
Block a user