-
Notifications
You must be signed in to change notification settings - Fork 21.5k
Closed
Labels
Description
Package event provides type Feed for subscription handling. A Feed is always constrained to a single type, and this restriction is enforced at runtime using reflection. With the introduction of generics in Go 1.18, it is now possible to declare and enforce the element type of Feed at compile time.
To avoid breaking downstream code, I suggest we add a new type FeedOf[T any] to package event. The behavior of this feed implementation would be exactly the same as the current one.