code: func (f *FlagLoader) processField(fieldName string, field *structs.Field) error {
  	if f.CamelCase {
  		fieldName = strings.Join(camelcase.Split(fieldName), "-")
  		fieldName = strings.Replace(fieldName, "---", "-", -1)
  	}
  
  	switch field.Kind() {
  	case reflect.Struct:
  		for _, ff := range field.Fields() {
  			flagName := field.Name() + "-" + ff.Name()
  
  			if f.Flatten {
  				// first check if it's set or not, because if we have duplicate
  				// we don't want to break the flag. Panic by giving a readable
  				// output
  				f.flagSet.VisitAll(func(fl *flag.Flag) {
  					if strings.ToLower(ff.Name()) == fl.Name {
  						// already defined
  						panic(fmt.Sprintf("flag '%s' is already defined in outer struct", fl.Name))
  					}
  				})
  
  				flagName = ff.Name()
  			}
  
  			if err := f.processField(flagName, ff); err != nil {
  				return err
  			}
  		}
  	default:
  		// Add custom prefix to the flag if it's set
  		if f.Prefix != "" {
  			fieldName = f.Prefix + "-" + fieldName
  		}
  
  		// we only can get the value from expored fields, unexported fields panics
  		if field.IsExported() {
  			f.flagSet.Var(newFieldValue(field), flagName(fieldName), f.flagUsage(fieldName, field))
  		}
  	}
  
  	return nil
  }
docs: // processField generates a flag based on the given field and fieldName. If a
  // nested struct is detected, a flag for each field of that nested struct is
  // generated too.