feature-8 #9
1 changed files with 1 additions and 3 deletions
f-8: clean: use kv func for db bin #8
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
commit
c2664e94fa
|
|
@ -52,9 +52,7 @@ func AddInDB(dbName string, line string) error {
|
|||
id := strings.Split(line, ";")[0] + "/bash"
|
||||
key := []byte(dbName + "/" + id)
|
||||
|
||||
return DB.Update(func(txn *badger.Txn) error {
|
||||
return txn.Set(key, []byte(line))
|
||||
})
|
||||
return kv.AddInDB(DB, string(key), line)
|
||||
}
|
||||
|
||||
func DeleteInDB(dbName, id string) error {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue