remizovm / geonames

Golang wrapper over the geonames.org website dump

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

country_info.go does not handle new CountryInfo.txt format

admPiett opened this issue · comments

Looks like there was a change, possibly by mistake, in the CountryInfo.txt file from Geonames. In cases where a country has a neighbor, the tab for the EquivalentFipsCode field is not included at the end of the line, resulting in len(raw) to be only 18, not 19. Should handle this case by possibly only verifying that raw has a length of at least 17 and only add the neighbors and/or EquivalentFipsCode if its the 18/19.