Ejemplo n.º 1
0
func NewCli() *cli.App {
	app := cli.NewApp()

	app.Name = Binary
	app.Commands = Commands

	return app
}
Ejemplo n.º 2
0
func New() *cli.App {
	app := cli.NewApp()

	app.Name = Binary
	app.Commands = Commands

	app.CommandNotFound = func(c *cli.Context, cmd string) {
		fmt.Fprintf(os.Stderr, "No such command \"%s\". Try `%s help`\n", cmd, Binary)
	}

	return app
}