etcdserver: fix from go vet, go lint

This commit is contained in:
Gyu-Ho Lee 2016-06-22 12:01:52 -07:00
parent e2138179e3
commit 725ded40f7

View File

@ -65,9 +65,8 @@ func (a *applierV2store) Put(r *pb.Request) Response {
if exists {
if r.PrevIndex == 0 && r.PrevValue == "" {
return toResponse(a.store.Update(r.Path, r.Val, ttlOptions))
} else {
return toResponse(a.store.CompareAndSwap(r.Path, r.PrevValue, r.PrevIndex, r.Val, ttlOptions))
}
return toResponse(a.store.CompareAndSwap(r.Path, r.PrevValue, r.PrevIndex, r.Val, ttlOptions))
}
return toResponse(a.store.Create(r.Path, r.Dir, r.Val, false, ttlOptions))
case r.PrevIndex > 0 || r.PrevValue != "":