|
|
|
|
|
by techn00
296 days ago
|
|
Hey, author here You're not forced to use that comment, you can pass the event however you like, if you satisfy the event.Any interface (by having the method EventName() string). I prefer that comment because Go doesn't have native sum types, and I believe that by using the framework in combination with the gochecksumtype linter, you get the best developer experience and type safety (you DO have tab autocomplete with the events for recordThat - the type system helps because of the sealed interface). But again, if you don't want to use the linter, no problem. You can create constructors for the events however you like, just like in your example. |
|