Skip to content

Commit

Permalink
Update README.md (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
gui-fkb authored Feb 17, 2025
1 parent 4a508e1 commit 267a02f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 267a02f

Please sign in to comment.