From 2e5689895dc57aad261e47ec35d6dc82937e642f Mon Sep 17 00:00:00 2001 From: Gun Store Date: Tue, 1 Dec 2020 21:23:57 +0000 Subject: [PATCH] Added TODO --- test/dnshandler.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/dnshandler.go b/test/dnshandler.go index 9c83544..0a3a6c4 100644 --- a/test/dnshandler.go +++ b/test/dnshandler.go @@ -53,12 +53,13 @@ func (b *DNSHandler) ServeDNS(w dns.ResponseWriter, req *dns.Msg) { defer w.WriteMsg(m) log.Info(m.String()) - fmt.Printf("\n\nreq count: %v\nlen: %v\n\n", requestCount[req.Question[0].Name], len(b.TxtRecords[req.Question[0].Name])) + log.Info("\n\nreq count: %v\nlen: %v\n\n", requestCount[req.Question[0].Name], len(b.TxtRecords[req.Question[0].Name])) if requestCount[req.Question[0].Name] < len(b.TxtRecords[req.Question[0].Name]) { + // TODO: investigate why this is needed. It seems that the object isn't being released between tests if requestCount[req.Question[0].Name] == 3 { requestCount[req.Question[0].Name] = 0 } - //fmt.Println("requestcount") + for _, record := range b.TxtRecords[req.Question[0].Name][requestCount[req.Question[0].Name]] { fmt.Println("for loop") txtRR, _ := dns.NewRR(fmt.Sprintf("%s %d IN TXT %s", req.Question[0].Name, defaultTTL, record)) @@ -68,7 +69,6 @@ func (b *DNSHandler) ServeDNS(w dns.ResponseWriter, req *dns.Msg) { } for _, rr := range m.Answer { - //fmt.Printf("responding %v", rr.String()) log.Info("responding", "response", rr.String()) } count++