Skip to content

Commit

Permalink
issue #3 Message -> bell.Message in README
Browse files Browse the repository at this point in the history
  • Loading branch information
alitvinenko committed Oct 14, 2021
1 parent 98b7e4d commit ed39287
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ type Message struct {

You can add more handlers one event:
```go
bell.Listen("event_name", func(message Message) {
bell.Listen("event_name", func(message bell.Message) {
// first handler
})
bell.Listen("event_name", func(message Message) {
bell.Listen("event_name", func(message bell.Message) {
// second handler
})
```
Expand All @@ -71,7 +71,7 @@ bell.Call("event_name", userStruct{Name: "Jon"})
```
Then parsing the data in the handler may look like this:
```go
bell.Listen("event_name", func(message Message) {
bell.Listen("event_name", func(message bell.Message) {
user := message.Value.(userStruct)

fmt.Printf("%#v\n", userStruct{Name: "Jon"}) // main.userStruct{Name:"Jon"}
Expand Down

0 comments on commit ed39287

Please sign in to comment.