Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit eeff731

Browse files
fix: topic list append (#281)
1 parent 1d27996 commit eeff731

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pubsub.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ func (s *PubSubSubscription) Next() (*Message, error) {
5858
return nil, err
5959
}
6060
topics := make([]string, len(r.TopicIDs))
61-
for _, mbtopic := range r.TopicIDs {
61+
for i, mbtopic := range r.TopicIDs {
6262
_, topic, err := mbase.Decode(mbtopic)
6363
if err != nil {
6464
return nil, err
6565
}
66-
topics = append(topics, string(topic))
66+
topics[i] = string(topic)
6767
}
6868
return &Message{
6969
From: from,

0 commit comments

Comments
 (0)