mirror of
https://github.com/coredns/coredns.git
synced 2025-11-08 13:06:24 -05:00
Use qname/qtype for lookups
Drop the use of dns.RR when in fact the only thing we use is the name and type of the RR. Cleans up a bunch of stuff and also stops the weird making of dns.RRs just for a lookup. Should safe some memory as well. Fixes: #66
This commit is contained in:
@@ -91,9 +91,8 @@ func (e *Elem) Delete(rr dns.RR) (empty bool) {
|
||||
return
|
||||
}
|
||||
|
||||
func Less(a *Elem, rr dns.RR) int {
|
||||
return middleware.Less(rr.Header().Name, a.Name())
|
||||
}
|
||||
// Less is a tree helper function that calles middleware.Less.
|
||||
func Less(a *Elem, name string) int { return middleware.Less(name, a.Name()) }
|
||||
|
||||
// Assuming the same type and name this will check if the rdata is equal as well.
|
||||
func equalRdata(a, b dns.RR) bool {
|
||||
|
||||
Reference in New Issue
Block a user