A fast Go client for performing lookups of DNS records, IPv4 addresses and IPv6 addresses using the Registration Data Access Protocol.
go get github.com/ryanmab/rdap-go@v0.1.0
package main
import (
"log"
"github.com/ryanmab/rdap-go/pkg/client"
)
func main() {
client := client.New()
response, err := client.LookupDomain("ryanmaber.co.uk")
if err != nil {
log.Panic(err)
}
log.Printf("Status: %s", response.Status)
}package main
import (
"github.com/ryanmab/rdap-go/pkg/client"
"log"
)
func main() {
client := client.New()
response, err := client.LookupIPv4("8.8.8.8")
if err != nil {
log.Panic(err)
}
log.Printf("Name: %s", response.Name) // GOGL
}package main
import (
"github.com/ryanmab/rdap-go/pkg/client"
"log"
)
func main() {
client := client.New()
response, err := client.LookupIPv6("2001:4860:4860::8888")
if err != nil {
log.Panic(err)
}
log.Printf("Name: %s", response.Name) // GOOGLE-IPV6
}Contributions are welcome, and encouraged - simply fork the repository, and make a pull request!