code: func (fs *FlagSet) ParseFlags(args []string, withHelp bool) error {
  	var help *bool
  	if withHelp {
  		help = fs.Bool([]string{"#help", "-help"}, false, "Print usage")
  	}
  	if err := fs.Parse(args); err != nil {
  		return err
  	}
  	if help != nil && *help {
  		fs.SetOutput(os.Stdout)
  		fs.Usage()
  		os.Exit(0)
  	}
  	if str := fs.CheckArgs(); str != "" {
  		fs.SetOutput(os.Stderr)
  		fs.ReportError(str, withHelp)
  		fs.ShortUsage()
  		os.Exit(1)
  	}
  	return nil
  }
docs: // ParseFlags is a utility function that adds a help flag if withHelp is true,
  // calls fs.Parse(args) and prints a relevant error message if there are
  // incorrect number of arguments. It returns error only if error handling is
  // set to ContinueOnError and parsing fails. If error handling is set to
  // ExitOnError, it's safe to ignore the return value.