{"repo":"maxmind/mmdb-from-go-blogpost","free":true,"listed":false,"github":"https://github.com/maxmind/mmdb-from-go-blogpost","clone":"git clone https://github.com/maxmind/mmdb-from-go-blogpost.git","description":"Enriching MMDB files with your own data using Go.","language":"Go","stars":30,"topics":["maxmind","mmdb","geoip2","geolite2","geolite2-country","ip","cidr","database"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"Enriching MMDB files with your own data using Go MaxMind DB (or MMDB) files facilitate the storage and retrieval of data in connection with IP addresses and IP address ranges, making queries for such data very fast and easy to perform. While MMDB files are usable on a variety of platforms and in a number of different programming languages, this article will focus on building MMDB files using the Go programming language. MaxMind offers several prebuilt MMDB files, like the free GeoLite2 Country MMDB file. For many situations these MMDB files are useful enough as is. If, however, you have your own data associated with IP address ranges, you can create hybrid MMDB files, enriching existing MMDB contents with your own data. In this article, we're going to add details about a fictional company's IP address ranges to the GeoLite2 Country MMDB file. We'll be building a new MMDB file, one that contains both MaxMind's and our fictional company's data. If you don't need any of the MaxMind data, but you still want to create a fast, easy-to-query database keyed on IP addresses and IP address ranges, you can consult this example code showing how to create an MMDB file from scratch. Prerequisites - you must have git installed in order to clone the code and install the dependencies, and it must be in your $PATH - Go 1.25 or later must be installed, and go must be in your $PATH - the mmdbinspect tool must be installed and be in your $PATH - a copy of the GeoLite2 Country database must be in ","default_branch":null,"files":null,"tree":[],"storefront":"/r/maxmind","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/maxmind/mmdb-from-go-blogpost/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."}