Example #1
0
File: cf.go Project: KaiYoung/cli
func main() {
	app, err := app.New()
	if err != nil {
		return
	}
	app.Run(os.Args)
}
Example #2
0
func findCommand(cmdName string) (cmd cli.Command) {
	myApp, _ := app.New()

	for _, cmd := range myApp.Commands {
		if cmd.Name == cmdName {
			return cmd
		}
	}

	return
}