func newClient() *client { var c = new(client) cli, err := table.Dial(*network, *address) if err != nil { fmt.Println("Dial failed: ", err) return nil } c.dbId = 0 c.c = cli.NewContext(c.dbId) return c }
func main() { flag.Parse() client, err := table.Dial(*network, *address) if err != nil { fmt.Printf("Dial failed: %s\n", err) return } defer client.Close() tc := client.NewContext(0) testGet(tc) testMGet(tc) testScan(tc) testZScan(tc) testCas(tc) testBinary(tc) testPing(tc) testAsync(tc) testDump(tc) }