From ce8cee9ef1a59847d16686c4ac554338781b4a7d Mon Sep 17 00:00:00 2001 From: Flc Date: Sun, 29 Dec 2024 23:25:59 +0800 Subject: [PATCH] chore(webhook): abstract event processing into generic function --- webhook/dispatcher.go | 1 - 1 file changed, 1 deletion(-) diff --git a/webhook/dispatcher.go b/webhook/dispatcher.go index e207411..4b60217 100644 --- a/webhook/dispatcher.go +++ b/webhook/dispatcher.go @@ -95,7 +95,6 @@ func (d *Dispatcher) RegisterBugCreateListener(listeners ...BugCreateListener) { func processEvent[L, E any](ctx context.Context, listeners []L, event E, fn func(L, E) error) error { eg, ctx := errgroup.WithContext(ctx) for _, listener := range listeners { - listener := listener eg.Go(func() error { return fn(listener, event) })