Merge pull request #333 from matje/issue-316-rdlen-2

Len returns the rr len of the uncompressed format.
This commit is contained in:
Miek Gieben 2016-03-17 14:31:27 +00:00
commit f8964231a8
1 changed files with 5 additions and 0 deletions

5
msg.go
View File

@ -1896,6 +1896,11 @@ func Copy(r RR) RR {
return r1
}
// Len returns the length (in octets) of the uncompressed RR in wire format.
func Len(r RR) int {
return r.len()
}
// Copy returns a new *Msg which is a deep-copy of dns.
func (dns *Msg) Copy() *Msg {
return dns.CopyTo(new(Msg))