Dont export typeToRR (old rr_mk)

This commit is contained in:
Miek Gieben 2014-09-16 07:31:20 +01:00
parent 70556daa85
commit 02dd474056
3 changed files with 4 additions and 4 deletions

View File

@ -437,7 +437,7 @@ func TestToRFC3597(t *testing.T) {
func TestNoRdataPack(t *testing.T) {
data := make([]byte, 1024)
for typ, fn := range TypeToRR {
for typ, fn := range typeToRR {
if typ == TypeCAA {
continue // TODO(miek): known omission
}
@ -454,7 +454,7 @@ func TestNoRdataPack(t *testing.T) {
// TODO(miek): fix dns buffer too small errors this throws
func TestNoRdataUnpack(t *testing.T) {
data := make([]byte, 1024)
for typ, fn := range TypeToRR {
for typ, fn := range typeToRR {
if typ == TypeSOA || typ == TypeTSIG || typ == TypeWKS {
// SOA, TSIG will not be seen (like this) in dyn. updates?
// WKS is an bug, but...deprecated record.

2
msg.go
View File

@ -1329,7 +1329,7 @@ func UnpackRR(msg []byte, off int) (rr RR, off1 int, err error) {
}
end := off + int(h.Rdlength)
// make an rr of that type and re-unpack.
mk, known := TypeToRR[h.Rrtype]
mk, known := typeToRR[h.Rrtype]
if !known {
rr = new(RFC3597)
} else {

View File

@ -1576,7 +1576,7 @@ func copyIP(ip net.IP) net.IP {
}
// Map of constructors for each RR type.
var TypeToRR = map[uint16]func() RR{
var typeToRR = map[uint16]func() RR{
TypeA: func() RR { return new(A) },
TypeAAAA: func() RR { return new(AAAA) },
TypeAFSDB: func() RR { return new(AFSDB) },