Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
rrSets := map[uint16][]dns.RR{}
for _, rr := range r.Response.Answer {
rrtype := rr.Header().Rrtype
set, ok := rrSets[rrtype]
if !ok {
set = []dns.RR{}
}
rrSets[rrtype] = append(set, rr)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment