From 8e68ad38d6a8ba9751e079bc0e42125f3b597846 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Sat, 8 Jun 2013 14:24:20 +0100 Subject: [PATCH] Use new stuff here too --- dns.go | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/dns.go b/dns.go index 403871b1..d6ccc24b 100644 --- a/dns.go +++ b/dns.go @@ -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 }