etcdctl: minor cleanup

This commit is contained in:
Xiang Li
2015-06-05 10:07:17 -07:00
committed by Yicheng Qin
parent e3fcc450cf
commit 61befc7ce6
4 changed files with 4 additions and 6 deletions

View File

@ -47,7 +47,7 @@ func mkdirCommandFunc(c *cli.Context, ki client.KeysAPI, prevExist client.PrevEx
ttl := c.Int("ttl")
// TODO: handle transport timeout
_, err := ki.Set(context.TODO(), key, "", &client.SetOptions{TTL: time.Second * time.Duration(ttl), Dir: true, PrevExist: prevExist})
_, err := ki.Set(context.TODO(), key, "", &client.SetOptions{TTL: time.Duration(ttl) * time.Second, Dir: true, PrevExist: prevExist})
if err != nil {
handleError(ExitServerError, err)
}