Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Commit

Permalink
alertstest: swaps out recorder channel for slice
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleterry committed Oct 5, 2020
1 parent 016675f commit 7fc54ee
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions instrumentation/alerts/alertstest/capturer.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
type Capturer struct {
tags []trackers.Tag

ReporterRecorders chan *ReporterRecorder
ReporterRecorders []*ReporterRecorder
}

func (c Capturer) WithNewTrace() trackers.Capturer {
Expand Down Expand Up @@ -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
}
Expand All @@ -65,7 +65,5 @@ func (c Capturer) Middleware() trackers.Middleware {
}

func NewCapturer() *Capturer {
return &Capturer{
ReporterRecorders: make(chan *ReporterRecorder),
}
return &Capturer{}
}

0 comments on commit 7fc54ee

Please sign in to comment.