Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
saromanov committed Apr 11, 2020
1 parent 0506e62 commit 938113e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ func main() {
emit := goemits.New(goemits.Config{
RedisAddress: "127.0.0.1:6379",
})
emit.On("connect", func(message string) {
emit.On("connect", func(message interface{}) {
fmt.Println("Found: ", message)
emit.Emit("disconnect", "data")
})

emit.On("disconnect", func(message string) {
emit.On("disconnect", func(message interface{}) {
fmt.Println("Disconnect")
emit.Quit()
})


emit.OnAny(func(message string) {
emit.OnAny(func(message interface{}) {
//This get any events
})
emit.Start()
Expand All @@ -40,5 +40,5 @@ func main() {

Emit of the event
```go
emit.On("disconnect", "now)
emit.On("disconnect", "now")
```

0 comments on commit 938113e

Please sign in to comment.