Developing lightweight computation at the DSG edge

Commit 8148e861 authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

[goclidote] Some refinements


Signed-off-by: Roger Pueyo Centelles's avatarRoger Pueyo Centelles <rpueyo@ac.upc.edu>
parent 20039d24
......@@ -112,7 +112,7 @@ func AntidoteRemoveRegisterInBucket(bucketName string, registerName string) bool
bucket := antidoteclient.Bucket{Bucket: []byte(bucketName)}
key := antidoteclient.Key(registerName)
err = bucket.Update(tx, antidoteclient.RegPut(key, []byte(nil)))
err = bucket.Update(tx, antidoteclient.RegPut(key, []byte("")))
errCheck(err, "")
setVal, err := bucket.ReadReg(tx, key)
......@@ -121,7 +121,7 @@ func AntidoteRemoveRegisterInBucket(bucketName string, registerName string) bool
err = tx.Commit()
errCheck(err, "")
if string(setVal[:]) == string("") {
if len(setVal) == 0 {
return true
}
......@@ -181,7 +181,7 @@ func AntidoteRemoveItemFromSetInBucket(bucketName string, setName string, itemVa
itemNotInSet := true
for _, v := range setVal {
if string(v) == itemValue {
if string(v[:]) == itemValue {
itemNotInSet = false
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment