store: clean up event.go, node.go and add tests

Updates IsCreated logic on event.go. Cleans up node.go
and adds tests to it.
This commit is contained in:
Gyu-Ho Lee
2015-12-25 02:58:46 -08:00
parent dac56faf61
commit 64e182c69e
3 changed files with 282 additions and 44 deletions

View File

@ -49,12 +49,7 @@ func (e *Event) IsCreated() bool {
if e.Action == Create {
return true
}
if e.Action == Set && e.PrevNode == nil {
return true
}
return false
return e.Action == Set && e.PrevNode == nil
}
func (e *Event) Index() uint64 {