fix: fix bugs in test

This commit is contained in:
dudaodong committed 2025-04-21 15:08:16 +08:00
1 parent 0b5dc86d70
commit 27667f8b3a
6 files changed
+80 -80

No files matched your search

+2
View File
@@ -2,6 +2,7 @@ package eventbus
import (
"fmt"
"sort"
"sync"
"time"
)
@@ -224,6 +225,7 @@ func ExampleEventBus_GetEvents() {
eb.Subscribe("event2", func(eventData int) {}, false, 0, nil)
events := eb.GetEvents()
sort.Strings(events)
for _, event := range events {
fmt.Println(event)