1
0
mirror of https://github.com/raseels-repos/golang-saas-starter-kit.git synced 2025-08-08 22:36:41 +02:00

fix broken geonames url for download country postal codes

This commit is contained in:
Lee Brown
2020-01-13 21:24:08 -08:00
parent 794b20ffb6
commit 7ab573c670

View File

@ -201,7 +201,7 @@ func (repo *Repository) GetGeonameCountry(ctx context.Context, country string) (
var err error var err error
var resp *http.Response var resp *http.Response
u := fmt.Sprintf("http://download.geonames.org/export/zip/%s.zip", country) u := fmt.Sprintf("http://www.geonames.org/export/zip/%s.zip", country)
h := fmt.Sprintf("%x", md5.Sum([]byte(u))) h := fmt.Sprintf("%x", md5.Sum([]byte(u)))
cp := filepath.Join(os.TempDir(), h+".zip") cp := filepath.Join(os.TempDir(), h+".zip")