-
Notifications
You must be signed in to change notification settings - Fork 0
Home
SakizciAdam edited this page Feb 27, 2022
·
1 revision
Event Emitter is lightweight Go package that implements a simple Event Bus.
go get https://github.com/SakizciAdam/eventemitter
package main
import (
"fmt"
"github.com/SakizciAdam/eventemitter"
)
func main() {
bus := eventemitter.New()
testListener := func(args ...interface{}) {
fmt.Println(args[0])
}
bus.AddListener("test", testListener)
bus.EmitSync("test", "Hellooo world")
}
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.