From fed393e39dd30bd5a9b09e151fe8fdd1119bf68b Mon Sep 17 00:00:00 2001 From: Wondertan Date: Sat, 22 Jan 2022 23:48:23 +0200 Subject: [PATCH] chore: better name --- pubsub.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pubsub.go b/pubsub.go index e5f8c04e..901314b9 100644 --- a/pubsub.go +++ b/pubsub.go @@ -1160,8 +1160,8 @@ type TopicOptions struct{} type TopicOpt func(t *Topic) error -// WithMsgIdFunction sets custom MsgIdFunction for a Topic, enabling topics to have own msg id generation rules. -func WithMsgIdFunction(msgId MsgIdFunction) TopicOpt { +// WithTopicMessageIdFn sets custom MsgIdFunction for a Topic, enabling topics to have own msg id generation rules. +func WithTopicMessageIdFn(msgId MsgIdFunction) TopicOpt { return func(t *Topic) error { t.p.idGen.Set(t.topic, msgId) return nil