mirror of
https://github.com/gissleh/irc.git
synced 2026-10-15 16:02:54 +00:00
This commit is contained in:
+2
-2
@@ -40,11 +40,11 @@ func BenchmarkHandle(b *testing.B) {
|
|||||||
eventName := strconv.FormatInt(rng.Int63(), 36) + strconv.FormatInt(rng.Int63(), 36) + strconv.FormatInt(rng.Int63(), 36)
|
eventName := strconv.FormatInt(rng.Int63(), 36) + strconv.FormatInt(rng.Int63(), 36) + strconv.FormatInt(rng.Int63(), 36)
|
||||||
|
|
||||||
client := irc.New(context.Background(), irc.Config{})
|
client := irc.New(context.Background(), irc.Config{})
|
||||||
event := irc.NewEvent("test", eventName)
|
event := irc.NewEvent("test_event", eventName)
|
||||||
|
|
||||||
wg := sync.WaitGroup{}
|
wg := sync.WaitGroup{}
|
||||||
client.AddHandler(func(event2 *irc.Event, _ *irc.Client) {
|
client.AddHandler(func(event2 *irc.Event, _ *irc.Client) {
|
||||||
if event2.Kind() != "hook" {
|
if event2.Kind() == "test_event" {
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user