Categorygithub.com/rdoorn/tinyresolver
repositorypackage
0.0.0-20200519122612-63f81f0f7f0d
Repository: https://github.com/rdoorn/tinyresolver.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

tinyresolver

tiny resolver is a simple DNS resolver for Golang, it can be used instead of a external DNS server as it relies on root hits to do its queries

usage:

resolver := tinyresolver.New()
rr, err := resolver.Resolve("ghostbox.org", "A")
if err != nil {
  panic(err)
}

answer := rr.Extra[0]
log.Printf("IP: %s", answer.(*dns.A).A)

it uses the miekg dns library, and these are also the results it returns.