func main() { cmd.Init() // create event handler ev := event.NewEvent() // subscribe to events go sub(ev) // publish events pub(ev) }
func NewEvent(opts ...event.Option) event.Event { return event.NewEvent(opts...) }