-
Notifications
You must be signed in to change notification settings - Fork 18
Description
I have a problem
In go //mediatr does not return a value
msg03 := &messages.Messages03{} eventType := reflect.TypeOf(&msg03) fmt.Println(" Get event type: ", eventType) eventType1 := reflect.TypeOf(msg03) fmt.Println(" Get event type: ", eventType1) err = mediatr.Publish(context.Background(), msg03) if err != nil { fmt.Println("Error:", err) return }
can trigger HandleMessage03 normally, but if you send a message to Imessage
var msg03 messages.Imessage = &messages.Messages03{}
handle in HandleMessage03 cannot trigger an
Error in source:handler for notification *messages.Messages03 is not a Handler.
Handler for notification *messages.Messages03 is not a handler
Since and find the registration type implementation handler why let trigger
Source code went to this if judgment
` handlerValue, ok := buildNotificationHandlerTNotification
if !ok {
return errors.Errorf("handler for notification %T is not a Handler", notification)
}`