feature-8 #9
1 changed files with 1 additions and 3 deletions
f-8: code: use recursive delete #8
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
commit
38f2ed1b83
|
|
@ -60,9 +60,7 @@ func AddInDB(dbName string, line string) error {
|
||||||
func DeleteInDB(dbName, id string) error {
|
func DeleteInDB(dbName, id string) error {
|
||||||
key := []byte(dbName + "/" + id + "/bash")
|
key := []byte(dbName + "/" + id + "/bash")
|
||||||
|
|
||||||
return DB.Update(func(txn *badger.Txn) error {
|
return kv.DeleteInDB(DB, string(key))
|
||||||
return txn.Delete(key)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func CountInDB(dbName, id string) int {
|
func CountInDB(dbName, id string) int {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue