package
Version:
v1.3.0
Opens a new window with list of versions in this module.
Published: Feb 7, 2026
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package iploc provides fast IP to country lookup using embedded binary data
generated from MaxMind GeoLite2-Country database.
The binary format is optimized for fast lookups using binary search with
direct memory access via unsafe pointers.
Country returns the ISO 3166-1 alpha-2 country code for the given net.IP.
Returns an empty string if the country cannot be determined.
IPCountry returns the ISO 3166-1 alpha-2 country code for the given netip.Addr.
Returns an empty string if the country cannot be determined.
Source Files
¶
Directories
¶
Command generate converts MaxMind GeoLite2-Country.mmdb to iploc binary format.
|
Command generate converts MaxMind GeoLite2-Country.mmdb to iploc binary format. |
Click to show internal directories.
Click to hide internal directories.