...
1 package dns
2
3
4
5
6
7
8 func IsDuplicate(r1, r2 RR) bool {
9
10 if !r1.Header().isDuplicate(r2.Header()) {
11 return false
12 }
13
14
15 return r1.isDuplicate(r2)
16 }
17
18 func (r1 *RR_Header) isDuplicate(_r2 RR) bool {
19 r2, ok := _r2.(*RR_Header)
20 if !ok {
21 return false
22 }
23 if r1.Class != r2.Class {
24 return false
25 }
26 if r1.Rrtype != r2.Rrtype {
27 return false
28 }
29 if !isDuplicateName(r1.Name, r2.Name) {
30 return false
31 }
32
33 return true
34 }
35
36
37 func isDuplicateName(s1, s2 string) bool { return equal(s1, s2) }
38
View as plain text