From dca19238da6b59feccfe690b3019f15506d6fc5a Mon Sep 17 00:00:00 2001 From: Sodesnei <1452401269@qq.com> Date: Sat, 9 Oct 2021 17:50:54 +0800 Subject: [PATCH] feat(middle): add middle worker function --- pkg/middle/worker.go | 1 + pkg/middle/worker_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/middle/worker.go b/pkg/middle/worker.go index 7d78b2d..67eadb1 100644 --- a/pkg/middle/worker.go +++ b/pkg/middle/worker.go @@ -11,6 +11,7 @@ func (m *MiddleWare) middleWorker() { for _, singles := range m.plugins { for _, single := range singles { single.Exec(workEvent) + } } diff --git a/pkg/middle/worker_test.go b/pkg/middle/worker_test.go index 4bdbcf5..332d7ef 100644 --- a/pkg/middle/worker_test.go +++ b/pkg/middle/worker_test.go @@ -8,6 +8,7 @@ import ( func TestWorker(t *testing.T) { event := event.NewEvent("LogContext") + m := NewMiddleWare() m.eventDriver.Put(event)