Example #1
0
// updateDirCommandFunc executes the "updateDir" command.
func updateDirCommandFunc(c *cli.Context, client *etcd.Client) (*etcd.Response, error) {
	if len(c.Args()) == 0 {
		return nil, errors.New("Key required")
	}
	key := c.Args()[0]
	ttl := c.Int("ttl")

	return client.UpdateDir(key, uint64(ttl))
}