whois-parser-go is a simple Go module for domain whois info parse.
It will parse the provided whois information and return a readable data struct.
Works for most domain extensions most of the time.
go get github.com/likexian/whois-parser-go
import (
"github.com/likexian/whois-parser-go"
)
Visit the docs on GoDoc
result, err := whoisparser.Parse(whois_raw)
if err == nil {
// Print the domain status
fmt.Println(result.Registrar.DomainStatus)
// Print the domain created date
fmt.Println(result.Registrar.CreatedDate)
// Print the domain expiration date
fmt.Println(result.Registrar.ExpirationDate)
// Print the registrant name
fmt.Println(result.Registrant.Name)
// Print the registrant email address
fmt.Println(result.Registrant.Email)
}
Please refer to whois-go
Copyright 2014-2019 Li Kexian
Licensed under the Apache License 2.0