geoip2-csv-converter: github.com/maxmind/geoip2-csv-converter/convert Index | Files

package convert

import "github.com/maxmind/geoip2-csv-converter/convert"

Index

Package Files

convert.go

func Convert Uses

func Convert(
    input io.Reader,
    output io.Writer,
    cidr bool,
    ipRange bool,
    intRange 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 Uses

func ConvertFile(
    inputFile string,
    outputFile string,
    cidr bool,
    ipRange bool,
    intRange 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`, or `intRange` to true. If none of these are set to true, it will strip off the network information.

Package convert imports 7 packages (graph) and is imported by 1 packages. Updated 2018-12-06. Refresh now. Tools for package owners.