func validateTeamNames(orgConfig org.Config) error {
	// Does the config duplicate any team names?
	used := sets.String{}
	dups := sets.String{}
	for name, orgTeam := range orgConfig.Teams {
		if used.Has(name) {
			dups.Insert(name)
		} else {
			used.Insert(name)
		}
		for _, n := range orgTeam.Previously {
			if used.Has(n) {
				dups.Insert(n)
			} else {
				used.Insert(n)
			}
		}
	}
	if n := len(dups); n > 0 {
		return fmt.Errorf("%d duplicated names: %s", n, strings.Join(dups.List(), ", "))
	}
	return nil
}
func validateTeamNames(orgConfig org.Config) error {
	
	used := sets.String{}
	dups := sets.String{}
	for name, orgTeam := range orgConfig.Teams {
		if used.Has(name) {
			dups.Insert(name)
		} else {
			used.Insert(name)
		}
		for _, n := range orgTeam.Previously {
			if used.Has(n) {
				dups.Insert(n)
			} else {
				used.Insert(n)
			}
		}
	}
	if n := len(dups); n > 0 {
		return fmt.Errorf("%d duplicated names: %s", n, strings.Join(dups.List(), ", "))
	}
	return nil
}
func validateTeamNames ( orgConfig org . Config ) error { // Does the config duplicate any team names? used := sets . String { } dups := sets . String { } for name , orgTeam := range orgConfig . Teams { if used . Has ( name ) { dups . Insert ( name ) } else { used . Insert ( name ) } for _ , n := range orgTeam . Previously { if used . Has ( n ) { dups . Insert ( n ) } else { used . Insert ( n ) } } } if n := len ( dups ) ; n > 0 { return fmt . Errorf ( " " , n , strings . Join ( dups . List ( ) , " " ) ) } return nil }
// validateTeamNames returns an error if any current/previous names are used multiple times in the config.
validateTeamNames returns an error if any current / previous names are used multiple times in the config .