Skip to content

andsala/geoip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geoip - IP geolocation with ipdata.co

Build Status Go Report Card codecov GoDoc

Installation

go get -u github.com/andsala/geoip

Usage

$ geoip 8.8.8.8
IP: 8.8.8.8
   United States (US)
   North America (NA)
   Coordinates:     37.751, -97.822

   Flag:            🇺🇸
   Time zone:       America/Chicago, GMT-0500 (CDT)
   Currency:        US Dollar (USD, $)
   Languages:       English
   Calling code:    +1

   Organization:    Google LLC (google.com)
   AS number:       AS15169
   Threat:          None

Options

--api-key value, -a value     ipdata.co api key [$GEOIP_API_KEY]
--ip-only, --ip               Print current public IP and exit
--json, -j                    Print pure json
--no-color                    Disable color and emoji output [$NO_COLOR] (https://no-color.org)
--user-agent value, -u value  HTTP user agent [$GEOIP_USER_AGENT]
--help, -h                    show help
--version, -v                 print the version

License

This project is distributed under the MIT License.

About

IP geolocation with ipdata.co

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages