Add generic Copy function that copies RRs
Don't export all the copy() functions, instead add a Copy() function that use the RR interface
This commit is contained in:
parent
0364de3abf
commit
bb2ef9e3fc
6
msg.go
6
msg.go
|
@ -1593,6 +1593,12 @@ func (dns *Msg) Copy() *Msg {
|
|||
return r1
|
||||
}
|
||||
|
||||
// Copy returns a new RR which is a deep-copy of r.
|
||||
func Copy(r RR) RR {
|
||||
r1 := r.copy()
|
||||
return r1
|
||||
}
|
||||
|
||||
// Put the parts of the name in the compression map.
|
||||
func compressionLenHelper(c map[string]int, s string) {
|
||||
pref := ""
|
||||
|
|
Loading…
Reference in New Issue