예제 #1
0
/*
CloseAndDeleteDB closes and deletes a db given handle and dbpath.
Useful in use and throw implementations. And also tests.
*/
func CloseAndDeleteDB(dbpath string, db *levigo.DB) {
	db.Close()
	if os.RemoveAll(dbpath) != nil {
		panic("Fail: Temporary DB files are still present at: " + dbpath)
	}
}