From fc8d3a64d69d0eb08783d1cbe85bc2b3835a49e8 Mon Sep 17 00:00:00 2001 From: longganhua <long> Date: 星期四, 18 七月 2019 14:31:22 +0800 Subject: [PATCH] syncdb.go --- command/query.go | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/command/query.go b/command/query.go index 0b572de..c8ad299 100644 --- a/command/query.go +++ b/command/query.go @@ -107,6 +107,7 @@ payload = []byte(args[1]) } + fmt.Println("query send len payload", len(payload)) cl, err := RPCClient(*rpcAddr, *rpcAuth) if err != nil { c.Ui.Error(fmt.Sprintf("Error connecting to Serf agent: %s", err)) @@ -167,6 +168,7 @@ break OUTER } handler.ResponseReceived(r) + fmt.Println("enter respch: r.payload", r.Payload) case <-c.ShutdownCh: return 1 @@ -220,16 +222,16 @@ } /** my self example*/ - fmt.Println("x length is: ", len(payload)) + fmt.Println("x length is: ", payload) // // byte to file. sdb.Dbconn.Close() sdb.Dbconn = nil - err = ioutil.WriteFile("test.db", payload, 0644) + err := ioutil.WriteFile("test.db", payload, 0644) if err != nil { fmt.Println("query byte to file error!", err) } - err := sdb.GetConn() + err = sdb.GetConn() if err != nil { fmt.Println("create db conn of test.db error: ", err) } -- Gitblit v1.8.0