Skip to content

Commit

Permalink
🧹 chore: rename Emit to AddEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
jingyuexing committed Dec 31, 2023
1 parent d2fbf2b commit fd52422
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion emit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand Down

0 comments on commit fd52422

Please sign in to comment.