Why does Session.AddHandler
take a *Session
as its first argument since it is already a method of the Session
struct?
#1418
-
Hello! Why does |
Beta Was this translation helpful? Give feedback.
Answered by
Malix-Labs
Aug 3, 2023
Replies: 1 comment
-
Session.AddHandler doesn't take a *Session as its first argument. |
Beta Was this translation helpful? Give feedback.
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
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