drop unused CreateDirIfNotExist function

I was wondering why this is exported, and the answer is, if it
weren't exported, staticcheck would have reported that it was unused,
which it is. We don't need a wrapper on os.MkdirAll that we never
use.

(cherry picked from commit e9a40cdc35)
This commit is contained in:
Seebs 2022-10-26 14:52:32 -05:00 • committed by Fletcher Haynes
parent 7d1fde7438
commit a508a15f3b

View file

@ -106,16 +106,6 @@ func (db *DB) WALPath() string {
return filepath.Join(db.Path, "wal")
}
func CreateDirIfNotExist(path string) {
dir := filepath.Dir(path)
if _, err := os.Stat(dir); os.IsNotExist(err) {
err = os.MkdirAll(dir, 0755)
if err != nil {
panic(err)
}
}
}
// TxN returns the number of active transactions.
func (db *DB) TxN() int {
db.mu.RLock()