From b47d6881de22dc8cda13f4c4ae86cdb7030228bb Mon Sep 17 00:00:00 2001 From: xc Date: Tue, 2 Sep 2025 12:13:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aufs/core/dtmem.go | 2 +- scagent/core/JsonRpc.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/aufs/core/dtmem.go b/aufs/core/dtmem.go index c59ecfc..48d6be2 100644 --- a/aufs/core/dtmem.go +++ b/aufs/core/dtmem.go @@ -37,7 +37,7 @@ func Dtmem(w http.ResponseWriter, r *http.Request) { } // 调用远程方法 var reply string - var args = Args{"."} + var args = Args{"D:\\aaa"} err = client.Call("FileRpcService.GetFilePath", args, &reply) if err != nil { fmt.Fprintf(w, "jsonrpc call faild %v", err) diff --git a/scagent/core/JsonRpc.go b/scagent/core/JsonRpc.go index 74f2374..49ffda3 100644 --- a/scagent/core/JsonRpc.go +++ b/scagent/core/JsonRpc.go @@ -16,7 +16,7 @@ type Args struct { // 返回的参数 type Reply struct { - FilePath string `json:"file_path"` + Redata string } // 返回的json数据 @@ -78,7 +78,8 @@ func (f *FileRpc) GetFilePath(args *Args, replay *Reply) error { logger.Error("转换为json字符串出错", zap.Error(err)) return err } - replay.FilePath = string(jsonStr) + // fmt.Printf("jsonStr: %s\n", jsonStr) + replay.Redata = string(jsonStr) return nil }