whois-parser-go is a simple Go module for whois info parser.
It will parser the provided whois information and reutrn a readable data in struct.
Work for most domain extensions and most of the time.
go get github.com/likexian/whois-parser-go
import (
"github.com/likexian/whois-parser-go"
)
func Parser(whois string) (whois_info WhoisInfo, err error)
result, err := whois_parser.Parser(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)
}
Copyright 2014, Kexian Li
Apache License, Version 2.0
Please refer to whois-go