ipwhois

package module
v0.0.0-...-a2ee498 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

README

cirello.io/ipwhois

Documentation

Overview

Package ipwhois is a command that queries IANA and other Network Information Centers for IP ownership by country.

Index

Constants

This section is empty.

Variables

View Source
var ErrAnswerNotFound = errors.New("answer not found")

ErrAnswerNotFound means that query command was not able to find the line for the country in the returned responses. It can happen either because the IP is invalid, but also because the parser could have failed and you need to query further using other tools.

Functions

func Query

func Query(ctx context.Context, rawIP string) (string, error)

Query reports what is the country owning the given IP. In-flight requests can be stopped if the given contenxt is canceled.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL