Registry / networking / miekg-dns

miekg-dns

JSON →
library1.1.72gogounverified

Package dns implements a full featured interface to the Domain Name System.

go get github.com/miekg/dns
INSTALL
IMPORT
SIG · MIEKG-DNS
M
miekg-dns
networkinggov1.1.72
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

dns
github.com/miekg/dns

Perform a DNS lookup

package main import ( "fmt" "github.com/miekg/dns" ) func main() { m := new(dns.Msg) m.SetQuestion(dns.Fqdn("example.com"), dns.TypeA) c := new(dns.Client) r, _, err := c.Exchange(m, "8.8.8.8:53") if err != nil { fmt.Println(err) return } for _, a := range r.Answer { fmt.Println(a) } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.1.72latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
miekg-dns — go get miekg-dns · libregistry