This is an automated email from the ASF dual-hosted git repository.

cserwen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-go.git


The following commit(s) were added to refs/heads/master by this push:
     new 1c6598f  fix wrong add for set when tags are set (#1001)
1c6598f is described below

commit 1c6598fe0d16f2afb097604d769fc37be01bd120
Author: cserwen <[email protected]>
AuthorDate: Fri Apr 28 11:10:37 2023 +0800

    fix wrong add for set when tags are set (#1001)
---
 internal/model.go | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/internal/model.go b/internal/model.go
index 0fd7955..f058925 100644
--- a/internal/model.go
+++ b/internal/model.go
@@ -73,15 +73,15 @@ func (sd *SubscriptionData) Clone() *SubscriptionData {
 
        if sd.Tags.Items() != nil {
                cloned.Tags = utils.NewSet()
-               for _, value := range sd.Tags.Items() {
-                       cloned.Tags.Add(value)
+               for key, value := range sd.Tags.Items() {
+                       cloned.Tags.AddKV(key, value.UniqueID())
                }
        }
 
        if sd.Codes.Items() != nil {
                cloned.Codes = utils.NewSet()
-               for _, value := range sd.Codes.Items() {
-                       cloned.Codes.Add(value)
+               for key, value := range sd.Codes.Items() {
+                       cloned.Codes.AddKV(key, value.UniqueID())
                }
        }
 

Reply via email to