From 3019e643a0c4efcfafd9563fecd90f90fe8f5de0 Mon Sep 17 00:00:00 2001 From: ifooth Date: Sat, 9 Dec 2023 15:57:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=20kv=20=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=A4=BA=E4=BE=8B=20--task=3D74728904?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/client.go | 2 +- examples/README.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/client/client.go b/client/client.go index 2091ed66d..b7cd1ca93 100644 --- a/client/client.go +++ b/client/client.go @@ -232,7 +232,7 @@ func (c *client) Get(app string, key string, opts ...option.AppOption) (string, } resp, err := c.upstream.GetKvValue(vas, req) if err != nil { - return "", fmt.Errorf("get key values failed, err: %s, rid: %s", err.Error(), vas.Rid) + return "", fmt.Errorf("get kv value failed, err: %s, rid: %s", err, vas.Rid) } return resp.Value, nil diff --git a/examples/README.md b/examples/README.md index 4d2f83161..14d6b6109 100644 --- a/examples/README.md +++ b/examples/README.md @@ -4,6 +4,8 @@ bscp sdk examples ## 示例代码 * [pull-file](./pull-file) - 拉取 file 型配置 * [watch-file](./watch-file) - 拉取 file 型配置并监听配置变更 +* [pull-kv](./pull-kv) - 拉取 kv 型配置 +* [watch-kv](./watch-kv) - 拉取 kv 型配置并监听配置变更 运行测试