| | |
| | | import ( |
| | | "flag" |
| | | "fmt" |
| | | "io/ioutil" |
| | | "strings" |
| | | "time" |
| | | |
| | | sdb "basic.com/pubsub/syncdb.git/db" |
| | | "github.com/hashicorp/serf/client" |
| | | "github.com/hashicorp/serf/cmd/serf/command/agent" |
| | | "github.com/mitchellh/cli" |
| | |
| | | payload = payload[:n-1] |
| | | } |
| | | |
| | | /** my self example*/ |
| | | fmt.Println("x length is: ", len(payload)) |
| | | |
| | | // // byte to file. |
| | | sdb.Dbconn.Close() |
| | | sdb.Dbconn = nil |
| | | err = ioutil.WriteFile("test.db", payload, 0644) |
| | | if err != nil { |
| | | fmt.Println("query byte to file error!", err) |
| | | } |
| | | err := sdb.GetConn() |
| | | if err != nil { |
| | | fmt.Println("create db conn of test.db error: ", err) |
| | | } |
| | | /* my self example*/ |
| | | |
| | | t.ui.Info(fmt.Sprintf("Response from '%s': %s", r.From, payload)) |
| | | } |
| | | |