use truncate option for badger

This commit is contained in:
Shawn Smith
2021-05-26 15:00:07 +09:00
parent 30107c813a
commit 158ee7b978

View File

@@ -110,7 +110,7 @@ func main() {
log.Fatal("ERROR: could not create repos dir: ", err)
}
db, err := badger.Open(badger.DefaultOptions("/usr/local/badger"))
db, err := badger.Open(badger.DefaultOptions("/usr/local/badger").WithTruncate(true))
if err != nil {
log.Fatal("ERROR: could not open badger db: ", err)
}