From 99834c146182cf51cbe4a24915f14c91208be994 Mon Sep 17 00:00:00 2001 From: mountain Date: Sun, 16 Jul 2023 17:01:06 +0900 Subject: [PATCH] =?UTF-8?q?objlen=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/redison_handler.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/redison_handler.go b/core/redison_handler.go index 93c19cc..996f450 100644 --- a/core/redison_handler.go +++ b/core/redison_handler.go @@ -331,7 +331,10 @@ func (rh *RedisonHandler) JSONObjLen(key, path string) ([]int64, error) { args := []any{ "JSON.OBJLEN", key, - path, + } + + if path != "$" { + args = append(args, path) } return respToArray[int64](rh.Do(rh.ctx, args...).Result())