geoip2-golang
geoip2-golang copied to clipboard
add support for asn network range
trafficstars
- Updates the ASN type to support the network range field.
- Refactors the ASN method to utilise the LookupNetwork method of the mmdbReader in order to capture the network address and subnet.
See Issue: #128
If we were to add this, we would add it to all the lookup types and make the value a netip.Prefix rather than a string. I would probably hold off doing that until we upgrade to maxminddb-golang/v2 though.
In the meantime, it is easy to use the models in this package with github.com/oschwald/maxmind-golang or github.com/oschwald/maxmind-golang/v2. I would suggest doing that for now.
Thanks for the heads up @oschwald. I'll give that a go.
This has been added in 2.0.0-beta.1.