Categorygithub.com/major1201/geo-cli
modulepackage
0.2.0
Repository: https://github.com/major1201/geo-cli.git
Documentation: pkg.go.dev

# README

geo-cli

Geo cli tool written in Golang using MaxMind geo data

GoDoc Go Report Card

Installation

$ go install github.com/major1201/geo-cli/cmd/geo

Usage

Download a MaxMind geo data file in https://dev.maxmind.com/geoip/geoip2/geolite2/

Set the environment var

export GEO_MMDBFILE=/opt/GeoLite2-City.mmdb

Query one address in detail

geo --detail 81.2.69.142

Query multiple addresses in one-line format

geo www.google.com 81.2.69.142

Read from pipe

traceroute www.google.com | geo

Specify language

geo --language zh-CN 81.2.69.142

Contributing

Just fork the repositry and open a pull request with your changes.

Licence

MIT

# Packages

No description provided by the author

# Functions

Open an mmdb file by MaxMind.
Query a host for record data.

# Structs

Geo is the parsed record geo data.
RetData is the struct to be returned by Query.