Alternative (more granular) approach to a DNS library

https://github.com/miekg/dns

  1. go は使えるとする。
  2. export GOPATH=~/gocode
  3. https://github.com/miekg/dns

go get github.com/miekg/dns
go build github.com/miekg/dns

# github.com/miekg/dns
gocode/src/github.com/miekg/dns/client.go:440:23: error: reference to undefined identifier ‘tls.DialWithDialer’
  conn.Conn, err = tls.DialWithDialer(&dialer, network, address, tlsConfig)
                       ^
gocode/src/github.com/miekg/dns/dnssec.go:257:25: error: reference to undefined identifier ‘crypto.Signer’
 func (rr *RRSIG) Sign(k crypto.Signer, rrset []RR) error {
                         ^
gocode/src/github.com/miekg/dns/dnssec.go:321:13: error: reference to undefined identifier ‘crypto.Signer’
 func sign(k crypto.Signer, hashed []byte, hash crypto.Hash, alg uint8) ([]byte, error) {
             ^
gocode/src/github.com/miekg/dns/sig0.go:16:23: error: reference to undefined identifier ‘crypto.Signer’
 func (rr *SIG) Sign(k crypto.Signer, m *Msg) ([]byte, error) {

A short "how to use the API" is at the beginning of doc.go
 (this also will show when you call godoc github.com/miekg/dns).

Example programs can be found in the github.com/miekg/exdns repository.