Ejemplo n.º 1
0
func mGet(c *table.Context, done chan *table.Call, zop bool, ma table.MGetArgs) {
	var err error
	var r []table.GetReply
	if zop {
		if done == nil {
			r, err = c.ZmGet(ma)
		} else {
			_, err = c.GoZmGet(ma, done)
		}
	} else {
		if done == nil {
			r, err = c.MGet(ma)
		} else {
			_, err = c.GoMGet(ma, done)
		}
	}
	if err != nil {
		fmt.Printf("MGet failed: %s\n", err)
		os.Exit(1)
	}

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