We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
The methods City() and Country should return nil if it finds nothing.
The current behavior is that is returns the zero value: https://github.com/oschwald/geoip2-golang/blob/master/reader.go#L240.
In this case, we have to check if city.GeonameID == 0 to know that it is not found.
city.GeonameID == 0
Wouldn't it be better to return nil instead ?
The text was updated successfully, but these errors were encountered:
This would be a breaking change. I would recommend using maxminddb directly if you want more control over this.
maxminddb
Sorry, something went wrong.
No branches or pull requests
Hello,
The methods City() and Country should return nil if it finds nothing.
The current behavior is that is returns the zero value: https://github.com/oschwald/geoip2-golang/blob/master/reader.go#L240.
In this case, we have to check if
city.GeonameID == 0
to know that it is not found.Wouldn't it be better to return nil instead ?
The text was updated successfully, but these errors were encountered: