refactor store.go add set function

This commit is contained in:
Xiang Li
2013-10-14 23:04:21 -07:00
parent 278a089908
commit fbf40fb74a
5 changed files with 19 additions and 8 deletions

View File

@ -7,6 +7,7 @@ import (
const (
Get = "get"
Create = "create"
Set = "set"
Update = "update"
Delete = "delete"
CompareAndSwap = "compareAndSwap"
@ -54,7 +55,7 @@ func (event *Event) Response() interface{} {
Expiration: event.Expiration,
}
if response.Action == Create || response.Action == Update {
if response.Action == Create || response.Action == Set {
response.Action = "set"
if response.PrevValue == "" {
response.NewKey = true