Esempio n. 1
0
func mSet(c *table.Context, done chan *table.Call, zop bool, ma table.MSetArgs) {
	var err error
	if zop {
		if done == nil {
			_, err = c.ZmSet(ma)
		} else {
			_, err = c.GoZmSet(ma, done)
		}
	} else {
		if done == nil {
			_, err = c.MSet(ma)
		} else {
			_, err = c.GoMSet(ma, done)
		}
	}
	if err != nil {
		fmt.Printf("MSet failed: %s\n", err)
		os.Exit(1)
	}

	if *verbose != 0 && done == nil {
		for i := 0; i < len(ma); i++ {
			var one = ma[i]
			fmt.Printf("%02d) [%q\t%q]\t[%d\t%q]\n", i,
				one.RowKey, one.ColKey, one.Score, one.Value)
		}
	}
}