code: func (f *FlagSet) Parse(arguments []string) error {
  	f.parsed = true
  	f.args = arguments
  	for {
  		seen, err := f.parseOne()
  		if seen {
  			continue
  		}
  		if err == nil {
  			break
  		}
  		switch f.errorHandling {
  		case ContinueOnError:
  			return err
  		case ExitOnError:
  			os.Exit(2)
  		case PanicOnError:
  			panic(err)
  		}
  	}
  
  	// Parse environment variables
  	if err := f.ParseEnv(os.Environ()); err != nil {
  		switch f.errorHandling {
  		case ContinueOnError:
  			return err
  		case ExitOnError:
  			os.Exit(2)
  		case PanicOnError:
  			panic(err)
  		}
  		return err
  	}
  
  	// Parse configuration from file
  	var cFile string
  	if cf := f.formal[DefaultConfigFlagname]; cf != nil {
  		cFile = cf.Value.String()
  	}
  	if cf := f.actual[DefaultConfigFlagname]; cf != nil {
  		cFile = cf.Value.String()
  	}
  	if cFile != "" {
  		if err := f.ParseFile(cFile); err != nil {
  			switch f.errorHandling {
  			case ContinueOnError:
  				return err
  			case ExitOnError:
  				os.Exit(2)
  			case PanicOnError:
  				panic(err)
  			}
  			return err
  		}
  	}
  
  	return nil
  }
docs: // Parse parses flag definitions from the argument list, which should not
  // include the command name. Must be called after all flags in the FlagSet
  // are defined and before flags are accessed by the program.
  // The return value will be ErrHelp if -help or -h were set but not defined.