Exemple #1
0
func main() {
	cmd.Init()

	// create event handler
	ev := event.NewEvent()

	// subscribe to events
	go sub(ev)

	// publish events
	pub(ev)
}
Exemple #2
0
func NewEvent(opts ...event.Option) event.Event {
	return event.NewEvent(opts...)
}