refactor: Replace manual map copy with maps.Copy in carrier-connector message queue

- Add maps import to mq.go
- Replace manual for loop copying payload map with maps.Copy in PublishProfileEvent
- Simplify map merging logic while maintaining same functionality
This commit is contained in:
nutcas3
2026-04-29 13:23:41 +03:00
parent ccb2ab7ee8
commit cd392894df
+2 -3
View File
@@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
"maps"
"os"
"time"
@@ -125,9 +126,7 @@ func (mq *MessageQueue) PublishProfileEvent(eventType string, profileID string,
},
}
for k, v := range payload {
msg.Payload[k] = v
}
maps.Copy(msg.Payload, payload)
return mq.Publish("profile-events", msg)
}