This is an automated email from the ASF dual-hosted git repository.
chenguangsheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/eventmesh-go.git
The following commit(s) were added to refs/heads/main by this push:
new 3ca2611 Update rocketmq_message_reader.go
new a4876b1 Merge pull request #13 from harshithasudhakar/patch-6
3ca2611 is described below
commit 3ca2611c145531da4ca7653aeb6b54944a000c83
Author: Harshitha Sudhakar
<[email protected]>
AuthorDate: Wed Apr 26 16:36:24 2023 +0530
Update rocketmq_message_reader.go
Some code optimizations at lines 53,55,58,61
---
plugin/connector/rocketmq/convert/rocketmq_message_reader.go | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/plugin/connector/rocketmq/convert/rocketmq_message_reader.go
b/plugin/connector/rocketmq/convert/rocketmq_message_reader.go
index 8d22baa..750f92e 100644
--- a/plugin/connector/rocketmq/convert/rocketmq_message_reader.go
+++ b/plugin/connector/rocketmq/convert/rocketmq_message_reader.go
@@ -50,15 +50,15 @@ func (r *RocketMQMessageReader) ReadEncoding()
binding.Encoding {
}
// ReadBinary read message and write through encoder
-func (r *RocketMQMessageReader) ReadBinary(ctx context.Context, encoder
binding.BinaryWriter) (err error) {
+func (r *RocketMQMessageReader) ReadBinary(_ context.Context, encoder
binding.BinaryWriter) (err error) {
subject := r.version.Attribute("subject")
- encoder.SetAttribute(subject, r.topic)
+ _ = encoder.SetAttribute(subject, r.topic)
msgType := r.version.Attribute("type")
- encoder.SetAttribute(msgType, constants.CloudEventMessageType)
+ _ = encoder.SetAttribute(msgType, constants.CloudEventMessageType)
contentType := r.version.Attribute("datacontenttype")
- encoder.SetAttribute(contentType,
r.properties[constants.RocketMQMessageContentTypeProperties])
+ _ = encoder.SetAttribute(contentType,
r.properties[constants.RocketMQMessageContentTypeProperties])
for k, v := range r.properties {
attr := r.version.Attribute(k)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]