func (cli *Cli) Run(args []string) error {
	if err := cli.doInit(); err != nil {
		panic(err)
	}
	inFlow := &step{desc: "RootIn"}
	outFlow := &step{desc: "RootOut"}
	return cli.parse(args[1:], inFlow, inFlow, outFlow)
}
/*
Run uses the app configuration (specs, commands, ...) to parse the args slice
and to execute the matching command.

In case of an incorrect usage, and depending on the configured ErrorHandling policy,
it may return an error, panic or exit
package cli
import (
	"flag"
	"fmt"
	"io"
	"os"
)
type Cli struct {
	*Cmd
	version *cliVersion
}
type cliVersion struct {
	version string
	option  *opt
}
func App(name, desc string) *Cli {
	return &Cli{
		Cmd: &Cmd{
			name:          name,
			desc:          desc,
			optionsIdx:    map[string]*opt{},
			argsIdx:       map[string]*arg{},
			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 *step) error {
	if cli.versionSetAndRequested(args) {
		cli.PrintVersion()
		exiter(0)
		return nil
	}
	return cli.Cmd.parse(args, entry, inFlow, outFlow)
}
func (cli *Cli) versionSetAndRequested(args []string) bool {
	return cli.version != nil && cli.isArgSet(args, cli.version.option.names)
}
func (cli *Cli) PrintVersion() {
	fmt.Fprintln(stdErr, cli.version.version)
}