mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-15 10:12:29 +08:00
fix: fix bugs in test
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user