pariz / gountries

Gountries provides: Countries (ISO-3166-1), Country Subdivisions(ISO-3166-2), Currencies (ISO 4217), Geo Coordinates(ISO-6709) as well as translations, country borders and other stuff exposed as struct data.
MIT License
408 stars 67 forks source link

FindCountryByName does not support official names #11

Closed aaronmcohen closed 7 years ago

aaronmcohen commented 7 years ago
gountries.New().FindCountryByName("United States of America") 

does not return a country where this does

gountries.New().FindCountryByName("United States") 

"United States of America" should be valid based on https://github.com/pariz/gountries/blob/9f809e356e5cc61e570a77e6b7fe5f5eafab3576/data/yaml/countries/us.yaml#L3

name:
  common: United States
  official: United States of America

Please extend this method to include official and native text.

Thank you!

pariz commented 7 years ago

Awesome. Thank you for the contribution!