little-cui commented on code in PR #305:
URL: https://github.com/apache/servicecomb-kie/pull/305#discussion_r1424251035
##########
server/datasource/etcd/kv/kv_cache.go:
##########
@@ -261,14 +264,15 @@ func Search(ctx context.Context, req *CacheSearchReq)
(*model.KVResponse, bool,
return result, true, nil
}
-func (kc *Cache) getKvFromEtcd(ctx context.Context, req *CacheSearchReq,
kvIdsLeft []string) []*model.KVDoc {
+func (kc *Cache) getKvFromEtcd(ctx context.Context, req *CacheSearchReq,
kvIdsLeft []string) ([]*model.KVDoc, error) {
if len(kvIdsLeft) == 0 {
- return nil
+ return nil, nil
}
openlog.Debug("get kv from etcd by kvId")
wg := sync.WaitGroup{}
docs := make([]*model.KVDoc, len(kvIdsLeft))
+ var Err error
Review Comment:
局部变量不应该大写命名
##########
server/datasource/etcd/kv/kv_cache.go:
##########
@@ -261,14 +264,15 @@ func Search(ctx context.Context, req *CacheSearchReq)
(*model.KVResponse, bool,
return result, true, nil
}
-func (kc *Cache) getKvFromEtcd(ctx context.Context, req *CacheSearchReq,
kvIdsLeft []string) []*model.KVDoc {
+func (kc *Cache) getKvFromEtcd(ctx context.Context, req *CacheSearchReq,
kvIdsLeft []string) ([]*model.KVDoc, error) {
if len(kvIdsLeft) == 0 {
- return nil
+ return nil, nil
}
openlog.Debug("get kv from etcd by kvId")
wg := sync.WaitGroup{}
docs := make([]*model.KVDoc, len(kvIdsLeft))
+ var Err error
Review Comment:
局部变量不应该大写命名
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]