etcdctl: minor cleanup
This commit is contained in:
@ -56,7 +56,7 @@ func setCommandFunc(c *cli.Context, ki client.KeysAPI) {
|
||||
prevIndex := c.Int("swap-with-index")
|
||||
|
||||
// TODO: handle transport timeout
|
||||
resp, err := ki.Set(context.TODO(), key, value, &client.SetOptions{TTL: time.Second * time.Duration(ttl), PrevIndex: uint64(prevIndex), PrevValue: prevValue})
|
||||
resp, err := ki.Set(context.TODO(), key, value, &client.SetOptions{TTL: time.Duration(ttl) * time.Second, PrevIndex: uint64(prevIndex), PrevValue: prevValue})
|
||||
if err != nil {
|
||||
handleError(ExitServerError, err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user