项目作者: andsala

项目描述 :
IP geolocation with ipdata.co
高级语言: Go
项目地址: git://github.com/andsala/geoip.git
创建时间: 2017-12-11T10:29:45Z
项目社区:https://github.com/andsala/geoip

开源协议:MIT License

下载


geoip - IP geolocation with ipdata.co

Build Status
Go Report Card
codecov
GoDoc

Installation

  1. go get -u github.com/andsala/geoip

Usage

  1. $ geoip 8.8.8.8
  2. IP: 8.8.8.8
  3. United States (US)
  4. North America (NA)
  5. Coordinates: 37.751, -97.822
  6. Flag: 🇺🇸
  7. Time zone: America/Chicago, GMT-0500 (CDT)
  8. Currency: US Dollar (USD, $)
  9. Languages: English
  10. Calling code: +1
  11. Organization: Google LLC (google.com)
  12. AS number: AS15169
  13. Threat: None

Options

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

License

This project is distributed under the MIT License.