Use new stuff here too

This commit is contained in:
Miek Gieben 2013-06-08 14:24:20 +01:00
parent b35306b755
commit 8e68ad38d6
1 changed files with 3 additions and 13 deletions

16
dns.go
View File

@ -160,19 +160,9 @@ func (h *RR_Header) String() string {
} else {
s += h.Name + "\t"
}
s = s + strconv.FormatInt(int64(h.Ttl), 10) + "\t"
if _, ok := ClassToString[h.Class]; ok {
s += ClassToString[h.Class] + "\t"
} else {
s += "CLASS" + strconv.Itoa(int(h.Class)) + "\t"
}
if _, ok := TypeToString[h.Rrtype]; ok {
s += TypeToString[h.Rrtype] + "\t"
} else {
s += "TYPE" + strconv.Itoa(int(h.Rrtype)) + "\t"
}
s += strconv.FormatInt(int64(h.Ttl), 10) + "\t"
s += Class(h.Class).String() + "\t"
s += Type(h.Rrtype).String() + "\t"
return s
}