projec1的TestRawGet1关于assert问题

这里没有Put直接Get结果不应该是nil然后err不为nil吗?为什么assert要求nil

1 个赞

cf下方的Set函数

func Set(s *standalone_storage.StandAloneStorage, cf string, key []byte, value []byte) error {
	return s.Write(nil, []storage.Modify{
		{
			Data: storage.Put{
				Cf:    cf,
				Key:   key,
				Value: value,
			},
		},
	})
}

[]byte{99}作为key,[]byte{42}作为val写入了s中,因此以[]byte{99}作为key的Get能拿到[]byte{42}的Value是正确的

1 个赞

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。