From 80abe74e469a47eda37f2f05c591cccde6271a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?France=CC=81=20Wilke?= <francewilke@gmail.com> Date: Mon, 15 Aug 2022 12:59:10 +0200 Subject: [PATCH] Expand CleanZone province code checks --- address_utils/address_utils.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/address_utils/address_utils.go b/address_utils/address_utils.go index e8a197b..2cf7ff2 100644 --- a/address_utils/address_utils.go +++ b/address_utils/address_utils.go @@ -224,11 +224,15 @@ func CleanZone(countryToClean, zoneToClean *string) (newCountry, newZone *string if *newCountry == "South Africa" && zoneToClean != nil { zone := *zoneToClean - // Gauteng - GT from uAfrica should be GP for Google if zone == "GT" { + // Gauteng - GT should be GP for Google zone = "GP" - } else if zone == "NT" { + } else if zone == "NT" || zone == "NL" { + // KZN - NT and NL should be KZN for Google zone = "KZN" + } else if zone == "NP" { + // Limpopo - NP should be LP for Google + zone = "LP" } for _, province := range Provinces { -- GitLab