This commit is contained in:
root committed 2020-04-20 10:24:33 +08:00
1 parent 97b90146ca
commit 45c6f4ad2f
2 files changed
+16 -3

No files matched your search

+12
View File
@@ -32,6 +32,18 @@ func New(dbPath ...string) error {
return err
}
tx, err := db.Begin(true)
if err != nil {
return err
}
if _, err := tx.CreateBucketIfNotExists([]byte("led")); err != nil {
tx.Rollback()
return err
}
tx.Commit()
return nil
}