tianxiaoliang commented on a change in pull request #16: SCB-1325 Refactoring
the delete function
URL: https://github.com/apache/servicecomb-kie/pull/16#discussion_r299327243
##########
File path: client/client.go
##########
@@ -112,3 +145,24 @@ func (c *Client) Get(ctx context.Context, key string,
opts ...GetOption) ([]*mod
}
return kvs, nil
}
+
+//Delete remove kv
+func (c *Client) Delete(ctx context.Context, kvID, labelID string) error {
+ url := fmt.Sprintf("%s/%s/%s", c.opts.Endpoint, APIPathKV, kvID)
+ if labelID != "" {
+ url = fmt.Sprintf("%s?labelID=%s", url, labelID)
+ }
+ h := http.Header{}
+ h.Set("Content-Type", "application/json")
+ h.Set("domain", "test")
Review comment:
delete, domain value is a dead code in server side, it is still not exposed
to API yet
----------------------------------------------------------------
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]
With regards,
Apache Git Services