tianxiaoliang commented on a change in pull request #816:
URL: 
https://github.com/apache/servicecomb-service-center/pull/816#discussion_r553141643



##########
File path: datasource/mongo/sd/types.go
##########
@@ -56,7 +56,7 @@ type MongoEventHandler interface {
 }
 
 func NewMongoEventByResource(resource *sdcommon.Resource, action 
discovery.EventType) MongoEvent {
-       return MongoEvent{ResourceID: resource.Key, DocumentID: 
resource.DocumentID, Value: resource.Value, Type: action}
+       return MongoEvent{ResourceID: resource.Key, DocumentID: 
resource.DocumentID, Value: resource.Value, Type: action, Index: resource.Index}

Review comment:
       一行是不好读的,每个属性一行,另外看下怎么做这种go的代码长度静态检查,加到检查里并清理工程里的这些问题




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to