func ActionCommand(action func()) CmdInitializer {
	return func(cmd *Cmd) {
		cmd.Action = action
	}
}
/*
ActionCommand is a convenience function to configure a command with an action.

cmd.ActionCommand(_, _, myFunc) is equivalent to cmd.Command(_, _, func(cmd *cli.Cmd) { cmd.Action = myFunc })
package cli
import (
	"flag"
	"fmt"
	"io"
	"os"
	"github.com/jawher/mow.cli/internal/container"
	"github.com/jawher/mow.cli/internal/flow"
)
type Cli struct {
	*Cmd
	version *cliVersion
}
type cliVersion struct {
	version string
	option  *container.Container
}
func App(name, desc string) *Cli {
	return &Cli{
		Cmd: &Cmd{
			name:          name,
			desc:          desc,
			optionsIdx:    map[string]*container.Container{},
			argsIdx:       map[string]*container.Container{},
			ErrorHandling: flag.ExitOnError,
		},
	}
}
func (cli *Cli) Version(name, version string) {
	cli.Bool(BoolOpt{
		Name:      name,
		Value:     false,
		Desc:      "Show the version and exit",
		HideValue: true,
	})
	names := mkOptStrs(name)
	option := cli.optionsIdx[names[0]]
	cli.version = &cliVersion{version, option}
}
func (cli *Cli) parse(args []string, entry, inFlow, outFlow *flow.Step) error {
	if cli.versionSetAndRequested(args) {
		cli.PrintVersion()
		cli.onError(errVersionRequested)
		return nil
	}
	return cli.Cmd.parse(args, entry, inFlow, outFlow)
}
func (cli *Cli) versionSetAndRequested(args []string) bool {
	return cli.version != nil && cli.isFirstItemAmong(args, cli.version.option.Names)
}
func (cli *Cli) PrintVersion() {
	fmt.Fprintln(stdErr, cli.version.version)
}
func (cli *Cli) Run(args []string) error {
	if err := cli.doInit(); err != nil {
		panic(err)
	}
	inFlow := &flow.Step{Desc: "RootIn", Exiter: exiter}
	outFlow := &flow.Step{Desc: "RootOut", Exiter: exiter}
	return cli.parse(args[1:], inFlow, inFlow, outFlow)
}