Really simple wrapper around rdap and whois with the express purpose of getting the registration date/age of a domain name.
go get github.com/nat-27/domainagepackage main
import (
"fmt"
"log"
"time"
"github.com/nat-27/domainage"
)
func main() {
domain := "example.com"
age, err := domainage.ResolveDomainRegistration(domain)
if err != nil {
log.Fatal(err)
}
fmt.Printf("The domain %s was registed on %s and is %d days old\n", domain, age, int64(time.Since(age)/time.Hour/24))
}