geoip2-golang
geoip2-golang copied to clipboard
Initialize location coordinates to NaN before lookup.
trafficstars
It's useful to have a semantic concept of location coordinates not being available when using the result of a lookup. Currently, a lookup resulting in no location will return a coordinate set of (0, 0). While this coordinate is in the Gulf of Guinea and thus could be argued to be a good "zero value" but (NaN, NaN) seems cleaner to me. Thoughts?
By the way, awesome work on the reader and lookup implementation!
Thanks. I think this might make sense. I need to think about it a bit more as it may be a breaking change for some people.