Dont export typeToRR (old rr_mk)
This commit is contained in:
parent
70556daa85
commit
02dd474056
|
@ -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
2
msg.go
|
@ -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 {
|
||||
|
|
2
types.go
2
types.go
|
@ -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) },
|
||||
|
|
Loading…
Reference in New Issue