Skip to content
Snippets Groups Projects
Commit e36510e4 authored by Cornel Rautenbach's avatar Cornel Rautenbach
Browse files
parent c1570504
No related branches found
No related tags found
No related merge requests found
...@@ -212,17 +212,17 @@ func stripUnwantedCharacters(s string) string { ...@@ -212,17 +212,17 @@ func stripUnwantedCharacters(s string) string {
func CleanZone(countryToClean, zoneToClean *string) (newCountry, newZone *string) { func CleanZone(countryToClean, zoneToClean *string) (newCountry, newZone *string) {
newCountry = countryToClean newCountry = countryToClean
southAfricaVariations := []string{"South Africa", "Suid-Afrika", "Suid Afrika", "Iningizimu Afrika", "Mzantsi Afrika", "Afrika Boroa", "Africa Kusini"} southAfricaVariations := []string{"ZA", "South Africa", "Suid-Afrika", "Suid Afrika", "Iningizimu Afrika", "Mzantsi Afrika", "Afrika Boroa", "Africa Kusini"}
for _, southAfricaVariation := range southAfricaVariations { for _, southAfricaVariation := range southAfricaVariations {
if countryToClean == nil || len(*countryToClean) == 0 || strings.ToLower(*countryToClean) == strings.ToLower(southAfricaVariation) { if countryToClean == nil || len(*countryToClean) == 0 || strings.ToLower(*countryToClean) == strings.ToLower(southAfricaVariation) {
defaultCountry := "ZA" defaultCountry := "South Africa"
newCountry = &defaultCountry newCountry = &defaultCountry
break break
} }
} }
if *newCountry == "ZA" && zoneToClean != nil { if *newCountry == "South Africa" && zoneToClean != nil {
zone := *zoneToClean zone := *zoneToClean
// Gauteng - GT from uAfrica should be GP for Google // Gauteng - GT from uAfrica should be GP for Google
if zone == "GT" { if zone == "GT" {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment