From d84df645202402c29b418b033fc104ddba689e17 Mon Sep 17 00:00:00 2001 From: Jacob Michels Date: Mon, 12 Jun 2023 20:18:46 -0400 Subject: [PATCH] add a noop notifier for testing --- notifier/noop.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 notifier/noop.go diff --git a/notifier/noop.go b/notifier/noop.go new file mode 100644 index 0000000..d3ee4fb --- /dev/null +++ b/notifier/noop.go @@ -0,0 +1,20 @@ +package notifier + +import ( + "context" + + coursesense "github.com/jacobmichels/Course-Sense-Go" +) + +var _ coursesense.Notifier = Noop{} + +type Noop struct { +} + +func NewNoop() Noop { + return Noop{} +} + +func (n Noop) Notify(ctx context.Context, section coursesense.Section, watchers ...coursesense.Watcher) error { + return nil +}