code: func SubCmdRunE(name string) func(*cobra.Command, []string) error {
  	return func(_ *cobra.Command, args []string) error {
  		if len(args) < 1 {
  			return errors.Errorf("missing subcommand; %q is not meant to be run on its own", name)
  		}
  
  		return errors.Errorf("invalid subcommand: %q", args[0])
  	}
  }
docs: // SubCmdRunE returns a function that handles a case where a subcommand must be specified
  // Without this callback, if a user runs just the command without a subcommand,
  // or with an invalid subcommand, cobra will print usage information, but still exit cleanly.
  // We want to return an error code in these cases so that the
  // user knows that their command was invalid.