whois

package module
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

README

whois.go

License GoDoc Build Status Go Report Card Code Cover

whois-go is a simple Go module for domain and ip whois info query.

Overview

You can directly using the binary distributions whois, follow whois release tool.

Or you can do development by using the golang module as below.

Works for most domain extensions and most ip most of the time.

Installation

go get -u github.com/likexian/whois-go

Importing

import (
    "github.com/likexian/whois-go"
)

Documentation

Visit the docs on GoDoc

Example

whois query for domain
result, err := whois.Whois("example.com")
if err == nil {
    fmt.Println(result)
}
whois query for ip
result, err := whois.Whois("1.1.1.1")
if err == nil {
    fmt.Println(result)
}

Whois info parser in Go

Please refer to whois-parser-go

LICENSE

Copyright 2014-2019 Li Kexian

Licensed under the Apache License 2.0

About

DONATE

Documentation

Index

Constants

View Source
const (
	// IANA_WHOIS_SERVER is iana whois server
	IANA_WHOIS_SERVER = "whois.iana.org"
	// DOMAIN_WHOIS_SERVER is tld whois server
	DOMAIN_WHOIS_SERVER = "whois-servers.net"
	// WHOIS_PORT is default whois port
	WHOIS_PORT = "43"
)

Variables

This section is empty.

Functions

func Author

func Author() string

Author returns package author

func IsIpv4

func IsIpv4(ip string) bool

IsIpv4 returns string is an ipv4 ip

func License

func License() string

License returns package license

func Version

func Version() string

Version returns package version

func Whois

func Whois(domain string, servers ...string) (result string, err error)

Whois do the whois query and returns whois info

Types

This section is empty.

Jump to

Keyboard shortcuts

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