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...)