golang-whois-lib is light golang module for checking domain's whois without using hardcoded domain zones. Lib searching whois info also on reffered servers. And caching result for every zones into map.
go get github.com/amonsat/golang-whois-lib
import (
whois "github.com/amonsat/golang-whois-lib"
)
func GetWhois(domain string) (result string, err error)
func GetWhoisTimeout(domain string, timeout time.Duration) (result string, err error)
result, _ := whois.GetWhois("google.com")
fmt.Println(result)
fmt.Printf("Nameservers: %v \n",whois.ParseNameServers(result))
Copyright 2017, Amonsat
Apache License, Version 2.0