whois

package module
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2021 License: BSD-2-Clause Imports: 5 Imported by: 0

README

whois

whois release (latest SemVer) Go Reference Test Status

Package whois provides simple whois protocol (RFC 3912) implementation.

Installation

go get github.com/alenichev/whois

or import as package:

import "github.com/alenichev/whois"

an run go get without arguments.

Usage examples

import "github.com/alenichev/whois"

ask "whois.iana.org" about "example.com":

output, err := whois.MakeWhoisQuery("whois.iana.org", "example.com")
if err != nil {
    // error handling
}

or (final result, using refer field from IANA's response, if needed):

output, err := whois.MakeWhoisQueryAll("example.com")
if err != nil {
    // error handling
}

Documentation

Overview

Package whois provides simple whois protocol (rfc3912) implementation.

Index

Constants

View Source
const WhoisIANA = "whois.iana.org"

IANA whois service address.

View Source
const WhoisPort = "43"

WHOIS protocol port.

Variables

View Source
var WhoisReadTimeout time.Duration = 5

WhoisReadTimeout sets timeout for reading response.

View Source
var WhoisTotalTimeout time.Duration = 60

WhoisTotalTimeout sets total timeout.

View Source
var WhoisWriteTimeout time.Duration = 5

WhoisWriteTimeout sets timeout for writing query.

Functions

func MakeWhoisQuery

func MakeWhoisQuery(host, domain string) (string, error)

MakeWhoisQuery makes query using whois protocol for domain on host and return response.

func MakeWhoisQueryAll

func MakeWhoisQueryAll(domain string) (string, error)

MakeWhoisQueryAll makes query using whois protocol to "whois.iana.org" for domain and follows refer field in response, if any.

Types

This section is empty.

Jump to

Keyboard shortcuts

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