code: func (c *Config) Parse(arguments []string) error {
  	// Parse first to get config file.
  	err := c.FlagSet.Parse(arguments)
  	if err != nil {
  		return errors.Trace(err)
  	}
  
  	// Load config file if specified.
  	if c.configFile != "" {
  		err = c.configFromFile(c.configFile)
  		if err != nil {
  			return errors.Trace(err)
  		}
  	}
  
  	// Parse again to replace with command line options.
  	err = c.FlagSet.Parse(arguments)
  	if err != nil {
  		return errors.Trace(err)
  	}
  
  	if len(c.FlagSet.Args()) != 0 {
  		return errors.Errorf("'%s' is an invalid flag", c.FlagSet.Arg(0))
  	}
  
  	return nil
  }
docs: // Parse parses flag definitions from the argument list.