Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document how to pass arguments to actor creation. #96

Closed
perbu opened this issue Dec 7, 2023 · 0 comments
Closed

document how to pass arguments to actor creation. #96

perbu opened this issue Dec 7, 2023 · 0 comments
Assignees

Comments

@perbu
Copy link
Collaborator

perbu commented Dec 7, 2023

A user might wonder how to pass arguments when spawning an actor. This is how you do it:

func newPlayerState(health int, username string) actor.Producer {
    return func() actor.Receiver {
        return &PlayerState{
            Health:   health,
            Username: username,
        }
    }
}
@perbu perbu self-assigned this Dec 7, 2023
perbu added a commit to perbu/hollywood that referenced this issue Dec 9, 2023
perbu added a commit to perbu/hollywood that referenced this issue Dec 9, 2023
document how to pass arguments to actor creation.

closes: anthdm#96
perbu added a commit to perbu/hollywood that referenced this issue Dec 9, 2023
document how to pass arguments to actor creation.

closes: anthdm#96
@anthdm anthdm closed this as completed in 7b29e83 Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant