You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/06/29 02:37:21 UTC

[GitHub] [servicecomb-kie] little-cui commented on a change in pull request #185: add upload interface

little-cui commented on a change in pull request #185:
URL: https://github.com/apache/servicecomb-kie/pull/185#discussion_r658628817



##########
File path: server/resource/v1/kv_resource.go
##########
@@ -40,6 +40,130 @@ import (
 type KVResource struct {
 }
 
+//Upload upload kvs
+func (r *KVResource) Upload(rctx *restful.Context) {
+	var err error
+	kvs := make([]*model.KVDoc, 0)
+	if err = readRequest(rctx, &kvs); err != nil {
+		WriteErrResponse(rctx, config.ErrInvalidParams, fmt.Sprintf(FmtReadRequestError, err))
+		return
+	}
+	result := logicOfOverride(kvs[:], rctx)

Review comment:
       kvs已经是slice,不用再生成一个新slice(kvs[:] -> kvs)




-- 
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: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org