From 81e90f1c834cd134bb880e4b1604045684c68656 Mon Sep 17 00:00:00 2001 From: golang-boy <58363816+golang-boy@users.noreply.github.com> Date: Tue, 1 Nov 2022 18:10:42 +0800 Subject: [PATCH 1/2] Update pubsub.go no subscriber should return an error when publishing --- pubsub/gochannel/pubsub.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pubsub/gochannel/pubsub.go b/pubsub/gochannel/pubsub.go index f47d0ca2b..3754c1963 100644 --- a/pubsub/gochannel/pubsub.go +++ b/pubsub/gochannel/pubsub.go @@ -142,8 +142,9 @@ func (g *GoChannel) sendMessage(topic string, message *message.Message) (<-chan if len(subscribers) == 0 { close(ackedBySubscribers) - g.logger.Info("No subscribers to send message", logFields) - return ackedBySubscribers, nil + err := errors.New("No subscribers") + g.logger.Error("No subscribers to send message", err, logFields) + return ackedBySubscribers, err } go func(subscribers []*subscriber) { From 8107f56c7d5494053c53c4acad969abbbae4ad0a Mon Sep 17 00:00:00 2001 From: golang-boy <58363816+golang-boy@users.noreply.github.com> Date: Wed, 2 Nov 2022 10:12:45 +0800 Subject: [PATCH 2/2] Update go.mod fix mod name --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 8b697264e..e90974907 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/ThreeDotsLabs/watermill +module github.com/golang-boy/watermill go 1.17