mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
Remove dnsutil.Dedup (#1867)
Remove the code and remove the call in etcd and kubernetes handlers. This does mean we should not add dups in the first place, which means adding maps in backend_lookup to prevent dups from begin added. This should cut down on the allocations because dnsutil.Dedup is very expensive by converting everything to strings, we avoid doing that now.
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
package dnsutil
|
||||
|
||||
import "github.com/miekg/dns"
|
||||
|
||||
// Dedup de-duplicates a message.
|
||||
func Dedup(m *dns.Msg) *dns.Msg {
|
||||
// TODO(miek): expensive!
|
||||
m.Answer = dns.Dedup(m.Answer, nil)
|
||||
m.Ns = dns.Dedup(m.Ns, nil)
|
||||
m.Extra = dns.Dedup(m.Extra, nil)
|
||||
return m
|
||||
}
|
||||
Reference in New Issue
Block a user