Browse Source

修正返回类型

master
xyiege 5 months ago
parent
commit
443bea1047
  1. 11
      scagent/core/JsonRpc.go

11
scagent/core/JsonRpc.go

@ -35,7 +35,7 @@ type FlpList struct {
}
// 获取文件路径
func (f *FileRpcService) GetFilePath(args *Args, replay *Reply) error {
func (f *FileRpcService) GetFilePath(args *Args, replay *string) error {
rootDir := args.FilePath
logger := util.NewProductionLogger()
defer logger.Sync()
@ -79,8 +79,15 @@ func (f *FileRpcService) GetFilePath(args *Args, replay *Reply) error {
return err
}
// fmt.Printf("jsonStr: %s\n", jsonStr)
replay.Redata = string(jsonStr)
*replay = string(jsonStr)
//
return nil
}
func (f *FileRpcService) GetFileHash(args *Args, replay *Reply) error {
// 计算文件hash
hash := util.CalacHash(args.FilePath)
replay.Redata = hash
return nil
}

Loading…
Cancel
Save