From f3170976fd9d354a9a15ee7467bdb22fa89114d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Sun, 15 Aug 2021 21:00:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=B1=BB=E5=9E=8B=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- middleware/redis/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/middleware/redis/client.go b/middleware/redis/client.go index c1a67b6..0b780b6 100644 --- a/middleware/redis/client.go +++ b/middleware/redis/client.go @@ -9,6 +9,7 @@ package redis import ( "encoding/json" + "fmt" "strings" "time" @@ -219,7 +220,7 @@ func (c *Client) CommandProxy(ctx *Context, flag string, cmd string, param ...in startTime := time.Now().Unix() cmdResult := realClient.Instance.Do(ctx.Ctx, redisCmd...) go c.log(ctx, realClient, cmdResult, startTime, time.Now().UnixNano()) - return cmdResult.String(), c.parseErrorFunc(cmdResult.Err()) + return fmt.Sprintf("%v", cmdResult.Val()), c.parseErrorFunc(cmdResult.Err()) } // CommandProxyWithReceiver 执行命令,并解析结果