From 7fc54ee74397bc8b2a81022fa2ca46fa52c2bd24 Mon Sep 17 00:00:00 2001 From: Kyle Terry Date: Mon, 5 Oct 2020 16:30:51 -0700 Subject: [PATCH] alertstest: swaps out recorder channel for slice --- instrumentation/alerts/alertstest/capturer.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/instrumentation/alerts/alertstest/capturer.go b/instrumentation/alerts/alertstest/capturer.go index 97c93bc..4cbb3ff 100644 --- a/instrumentation/alerts/alertstest/capturer.go +++ b/instrumentation/alerts/alertstest/capturer.go @@ -11,7 +11,7 @@ import ( type Capturer struct { tags []trackers.Tag - ReporterRecorders chan *ReporterRecorder + ReporterRecorders []*ReporterRecorder } func (c Capturer) WithNewTrace() trackers.Capturer { @@ -51,7 +51,7 @@ func (c Capturer) Capture(err error) trackers.Reporter { tags: c.tags, } - c.ReporterRecorders <- rr + c.ReporterRecorders = append(c.ReporterRecorders, rr) return rr } @@ -65,7 +65,5 @@ func (c Capturer) Middleware() trackers.Middleware { } func NewCapturer() *Capturer { - return &Capturer{ - ReporterRecorders: make(chan *ReporterRecorder), - } + return &Capturer{} }