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

# 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.

# Packages

No description provided by the author

# Functions

No description provided by the author
New creates a new resolver.

# Constants

MaxDepth is the max recursive depth to query.
MaxNameservers is the max name servers to query simultainiously.
Timeout is the time in seconds the request is allowed to take before a timeout error is returned.

# Variables

Various errors.
Various errors.
Various errors.
Various errors.

# Structs

Resolver is the resolver object.