code: func (a *Application) Run() int {
  	if len(os.Args) < 1 {
  		panic("shell-provided arguments are not present")
  	}
  	arguments := os.Args[1:]
  	// $ program
  	//           ^ no args
  	if len(arguments) == 0 {
  		if a.Default == nil {
  			a.println(a.globalHelp())
  			return 0
  		}
  
  		return a.Default(*newContext(a))
  	}
  
  	yankeeGoHome := func(errMsg string) {
  		a.printerr(errMsg)
  		os.Exit(1)
  	}
  
  	subcommandName := arguments[0]
  	subcommand := a.commandByName(subcommandName)
  
  	if subcommandName == "help" {
  		// $ program help
  		//           ^ one argument
  		if len(arguments) <= 1 {
  			a.println(a.globalHelp())
  			return 0
  		}
  
  		command := a.commandByName(arguments[1])
  		if command != nil {
  			a.println(a.commandHelp(command))
  			return 0
  		}
  
  		topic := a.topicByName(arguments[1])
  		if topic != nil {
  			a.println(topic.Text)
  			return 0
  		}
  
  		yankeeGoHome("no such command or help topic")
  	}
  
  	if subcommandName == "version" {
  		if subcommand != nil {
  			return subcommand.Run(Context{})
  		}
  
  		a.printf("%s version %s\n", a.Name, a.Version)
  		return 0
  	}
  
  	if subcommand != nil {
  		context, err := a.parseContext(subcommand.Flags, arguments[1:])
  		if err != nil {
  			yankeeGoHome(err.Error())
  		}
  
  		return subcommand.Run(*context)
  	}
  
  	yankeeGoHome("unknown subcommand \"" + subcommandName + "\"\n")
  	return 1
  }
docs: // Run executes a CLI.
  //
  // Take a note, Run panics if len(os.Args) < 1