diff --git a/README.md b/README.md index ee663e7..56b883b 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,9 @@ Simple enough. The `newHelloer` function returns a new actor. The actor is a str Lets look at the `Receive` method. ```go -type message struct {} +type message struct { + data string +} func (h *helloer) Receive(ctx *actor.Context) { switch msg := ctx.Message().(type) { @@ -135,7 +137,7 @@ Local messages can be of any type. Finally, lets send a message to the actor. ```go -engine.Send(pid, "hello world!") +engine.Send(pid, &message{data: "hello, world!"}) ``` This will send a message to the actor. Hollywood will route the message to the correct actor. The actor will then print