From acb33a5f3f4782f74c57cb7713227b8a63898f96 Mon Sep 17 00:00:00 2001 From: "Sahdev P. Zala" Date: Sat, 8 Feb 2020 22:01:20 -0500 Subject: [PATCH] etcdctl: use appropriate type conversion index variable is being passed as uint64 so we shouldn't use Int. Also the if loop is redundant so remove it. --- etcdctl/ctlv2/command/exec_watch_command.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/etcdctl/ctlv2/command/exec_watch_command.go b/etcdctl/ctlv2/command/exec_watch_command.go index 4cc859820..3661f61ef 100644 --- a/etcdctl/ctlv2/command/exec_watch_command.go +++ b/etcdctl/ctlv2/command/exec_watch_command.go @@ -76,10 +76,7 @@ func execWatchCommandFunc(c *cli.Context, ki client.KeysAPI) { cmdArgs = args[:argslen-1] } - index := 0 - if c.Int("after-index") != 0 { - index = c.Int("after-index") - } + index := c.Uint64("after-index") recursive := c.Bool("recursive")