Exemple #1
0
func (o *stringRow) loadObjectValue(r rpdbReader) (interface{}, error) {
	_, err := o.LoadDataValue(r)
	if err != nil {
		return nil, err
	}
	return rdb.String(o.Value), nil
}
Exemple #2
0
func xslotsrestore(t *testing.T, db uint32, args ...interface{}) {
	x := []interface{}{}
	for i, a := range args {
		switch i % 3 {
		case 0, 1:
			x = append(x, a)
		case 2:
			dump, err := rdb.EncodeDump(rdb.String([]byte(a.(string))))
			checkerror(t, err, true)
			x = append(x, dump)
		}
	}
	err := testbl.SlotsRestore(db, x...)
	checkerror(t, err, true)
}