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