mirror of
https://github.com/talent-plan/tinykv.git
synced 2025-03-28 21:10:23 +08:00
add the Value method for Modify type (#133)
This commit is contained in:
parent
8aa0fa7768
commit
096240d32f
@ -26,6 +26,14 @@ func (m *Modify) Key() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Modify) Value() []byte {
|
||||
if putData, ok := m.Data.(Put); ok {
|
||||
return putData.Value
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Modify) Cf() string {
|
||||
switch m.Data.(type) {
|
||||
case Put:
|
||||
|
Loading…
Reference in New Issue
Block a user