Skip to content

Why does Session.AddHandler take a *Session as its first argument since it is already a method of the Session struct? #1418

Closed Answered by Malix-Labs
Malix-Labs asked this question in Q&A
Discussion options

You must be logged in to vote

Session.AddHandler doesn't take a *Session as its first argument.
It takes a function that itself takes a *Session and the event as argument.
The handler just then triggers that function when the said event is triggered

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Malix-Labs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant