Documentation ¶
Overview ¶
Package convert transforms a GeoIP2/GeoLite2 CSV to various formats.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Convert ¶
func Convert( input io.Reader, output io.Writer, cidr bool, ipRange bool, intRange bool, hexRange bool, ) error
Convert writes the MaxMind GeoIP2 or GeoLite2 CSV in the `input` io.Reader to the Writer `output` using the network representation specified by setting `cidr`, ipRange`, or `intRange` to true. If none of these are set to true, it will strip off the network information.
func ConvertFile ¶
func ConvertFile( inputFile string, outputFile string, cidr bool, ipRange bool, intRange bool, hexRange bool, ) error
ConvertFile converts the MaxMind GeoIP2 or GeoLite2 CSV file `inputFile` to `outputFile` file using a different representation of the network. The representation can be specified by setting one or more of `cidr`, `ipRange`, `intRange` or `hexRange` to true. If none of these are set to true, it will strip off the network information.
Types ¶
This section is empty.