diff --git a/plugin/pkg/dnstest/recorder.go b/plugin/pkg/dnstest/recorder.go index ebffaf937..1237cb6bc 100644 --- a/plugin/pkg/dnstest/recorder.go +++ b/plugin/pkg/dnstest/recorder.go @@ -2,7 +2,6 @@ package dnstest import ( - "runtime" "time" "github.com/miekg/dns" @@ -20,10 +19,6 @@ type Recorder struct { Len int Msg *dns.Msg Start time.Time - // CallerN holds string return value of the call to runtime.Caller(N) - Caller1 string - Caller2 string - Caller3 string } // NewRecorder makes and returns a new Recorder, @@ -41,9 +36,6 @@ func NewRecorder(w dns.ResponseWriter) *Recorder { // WriteMsg records the status code and calls the // underlying ResponseWriter's WriteMsg method. func (r *Recorder) WriteMsg(res *dns.Msg) error { - _, r.Caller1, _, _ = runtime.Caller(1) - _, r.Caller2, _, _ = runtime.Caller(2) - _, r.Caller3, _, _ = runtime.Caller(3) // We may get called multiple times (axfr for instance). // Save the last message, but add the sizes. r.Len += res.Len()