{"repo":"oschwald/geoip2-golang","free":true,"listed":false,"github":"https://github.com/oschwald/geoip2-golang","clone":"git clone https://github.com/oschwald/geoip2-golang.git","description":"Unofficial MaxMind GeoIP2 Reader for Go","language":"Go","stars":2329,"topics":["geoip2","maxmind-db","geoip","database","go","geolocation","maxmind"],"license":"ISC","category":"databases-storage","readme_excerpt":"GeoIP2 Reader for Go This library reads MaxMind GeoLite2 and GeoIP2 databases. This library is built using the Go maxminddb reader. All data for the database record is decoded using this library. Version 2.0 provides significant performance improvements with 56% fewer allocations and 34% less memory usage compared to v1. Version 2.0 also adds Network and IPAddress fields to all result structs, and includes a HasData() method to easily check if data was found. If you only need several fields, you may get superior performance by using maxminddb's Lookup directly with a result struct that only contains the required fields. (See example test.go in the maxminddb repository for an example of this.) Installation New in v2 Version 2.0 includes several major improvements: - Performance : 56% fewer allocations and 34% less memory usage - Modern API : Uses netip.Addr instead of net.IP for better performance - Network Information : All result structs now include Network and IPAddress fields - Data Validation : New HasData() method to easily check if data was found - Structured Names : Replaced map[string]string with typed Names struct for better performance Migration See MIGRATION.md for step-by-step guidance on upgrading from v1. Usage See GoDoc for documentation and examples. Example Requirements - Go 1.25 or later - MaxMind GeoIP2 or GeoLite2 database files (.mmdb format) Generated Decoders Database model structs use decoders generated by the maxminddb-gen tool from maxminddb-golang .","default_branch":null,"files":null,"tree":[],"storefront":"/r/oschwald","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/oschwald/geoip2-golang/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}