Skip to content

Commit

Permalink
Print CNAME records
Browse files Browse the repository at this point in the history
  • Loading branch information
rs committed Oct 5, 2018
1 parent 4f4d9db commit 5544dd1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ func main() {
fmt.Print("\n")
}

if rtype == client.ResponseTypeDelegation {
switch rtype {
case client.ResponseTypeDelegation:
var label string
for _, rr := range r.Ns {
if ns, ok := rr.(*dns.NS); ok {
Expand All @@ -138,6 +139,10 @@ func main() {
}
fmt.Printf("%s %d NS %s (%s)\n", label, s.TTL, s.Name, glue)
}
case client.ResponseTypeCNAME:
for _, rr := range r.Answer {
fmt.Println(rr)
}
}
},
FollowingCNAME: func(domain, target string) {
Expand Down

0 comments on commit 5544dd1

Please sign in to comment.