From eccee11018f4bd76ccc736142c254b0e4ce898b3 Mon Sep 17 00:00:00 2001 From: manas-rust Date: Tue, 28 Nov 2023 16:27:07 +0800 Subject: [PATCH] fix: run actor-mailbox-middleware failed Signed-off-by: manas-rust --- _examples/actor-mailbox-middleware/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/_examples/actor-mailbox-middleware/main.go b/_examples/actor-mailbox-middleware/main.go index cc91f209..2f2a09f8 100644 --- a/_examples/actor-mailbox-middleware/main.go +++ b/_examples/actor-mailbox-middleware/main.go @@ -30,8 +30,10 @@ func (m *mailboxLogger) MailboxEmpty() { func main() { system := actor.NewActorSystem() rootContext := system.Root - props := actor.PropsFromFunc(func(ctx actor.Context) { - }, actor.WithMailbox(actor.Unbounded(&mailboxLogger{logger: system.Logger}))) + props := actor.PropsFromFunc( + func(ctx actor.Context) {}, + actor.WithMailbox(actor.Unbounded(&mailboxLogger{logger: system.Logger()})), + ) pid := rootContext.Spawn(props) rootContext.Send(pid, "Hello") _, _ = console.ReadLine()