We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 355437f commit ca1eeb5Copy full SHA for ca1eeb5
2 files changed
events.go
@@ -0,0 +1,17 @@
1
+package pluginlib
2
+
3
+import "github.com/asaskevich/EventBus"
4
5
+var bus = EventBus.New()
6
7
+func Subscribe(eventName string, fn interface{}) error {
8
+ return bus.Subscribe(eventName, fn)
9
+}
10
11
+func Unsubscribe(eventName string, fn interface{}) error {
12
+ return bus.Unsubscribe(eventName, fn)
13
14
15
+func Publish(eventName string, args ...interface{}) {
16
+ bus.Publish(eventName, args)
17
go.mod
@@ -1,3 +1,5 @@
module github.com/getstackhead/pluginlib
go 1.17
+require github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef
0 commit comments