func RegisterType(t string, h MessageHandler) {
	mu.Lock()
	defer mu.Unlock()
	typeHandlers[t] = append(typeHandlers[t], h)
}
// RegisterType registers a function to be called when a message is sent with matching type.
RegisterType registers a function to be called when a message is sent with matching type.
// RegisterType registers a function to be called when a message is sent with matching type .
func RegisterType(t string, h MessageHandler) {
	mu.Lock()
	defer mu.Unlock()
	typeHandlers[t] = append(typeHandlers[t], h)
}
func RegisterType ( t string , h MessageHandler ) { mu . Lock ( ) defer mu . Unlock ( ) typeHandlers [ t ] = append ( typeHandlers [ t ] , h ) }
RegisterType registers a function to be called when a message is sent with matching type.
RegisterType registers a function to be called when a message is sent with matching type .