etcdctl/ctlv2/command/rm_command.go
func NewRemoveCommand() cli.Command {
	return cli.Command{
		Name:      "rm",
		Usage:     "remove a key or a directory",
		ArgsUsage: "<key>",
		Flags: []cli.Flag{
			cli.BoolFlag{Name: "dir", Usage: "removes the key if it is an empty directory or a key-value pair"},
			cli.BoolFlag{Name: "recursive, r", Usage: "removes the key and all child keys(if it is a directory)"},
			cli.StringFlag{Name: "with-value", Value: "", Usage: "previous value"},
			cli.IntFlag{Name: "with-index", Value: 0, Usage: "previous index"},
		},
		Action: func(c *cli.Context) error {
			rmCommandFunc(c, mustNewKeyAPI(c))
			return nil
		},
	}
}
func NewRemoveCommand() cli.Command {
	return cli.Command{
		Name:      "rm",
		Usage:     "remove a key or a directory",
		ArgsUsage: "<key>",
		Flags: []cli.Flag{
			cli.BoolFlag{Name: "dir", Usage: "removes the key if it is an empty directory or a key-value pair"},
			cli.BoolFlag{Name: "recursive, r", Usage: "removes the key and all child keys(if it is a directory)"},
			cli.StringFlag{Name: "with-value", Value: "", Usage: "previous value"},
			cli.IntFlag{Name: "with-index", Value: 0, Usage: "previous index"},
		},
		Action: func(c *cli.Context) error {
			rmCommandFunc(c, mustNewKeyAPI(c))
			return nil
		},
	}
}
// NewRemoveCommand returns the CLI command for "rm".