Closed subpop closed 1 year ago
I took a different approach towards unpacking a signal into a WorkerEvent. I dropped the two global variables; they weren't useful without adding variability to them, and after that happens, there is no reason to keep global error variables at all. I renamed the unpack error into a more descriptively named "typeConversionError", since that's more accurately describing what the error carries. I dropped the error checking for signal name and parameter length. Looping over the body slice and attempting to convert the interface{}
types to their appropriate types will catch any errors that might exist from incorrect signal bodies.
Return errors when handling Event signals emitted by workers and handle the optional 'message' parameter gracefully.
Signed-off-by: Link Dupont link@sub-pop.net