mirror of
https://github.com/eventials/goevents.git
synced 2025-04-24 13:48:53 +08:00
Update exemple.
This commit is contained in:
parent
6aae479858
commit
412c735150
@ -32,7 +32,7 @@ if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
c.Subscribe("my_action", func(body []byte) bool {
|
||||
c.Subscribe("object.*", func(body []byte) bool {
|
||||
fmt.Println(body)
|
||||
return true
|
||||
})
|
||||
@ -53,7 +53,7 @@ if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
err = p.Publish("my_action", []byte("message"))
|
||||
err = p.Publish("object.my_action", []byte("message"))
|
||||
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user