From fd52422591ff4b9e996740f1341a880f22673265 Mon Sep 17 00:00:00 2001 From: jingyuexing <19589872+jingyuexing@users.noreply.github.com> Date: Sun, 31 Dec 2023 12:54:19 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20chore:=20rename=20`Emit`=20to=20?= =?UTF-8?q?`AddEvent`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- emit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emit.go b/emit.go index 9166ab3..77946af 100644 --- a/emit.go +++ b/emit.go @@ -40,7 +40,7 @@ func (e *EventEmit) On(name string, callback func(args ...any)) { defer e.mutex.Unlock() } -func (e *EventEmit) Emit(name string, args ...any) { +func (e *EventEmit) AddEvent(name string, args ...any) { e.mutex.Lock() for _, call := range e.events[name] { call(args...)