mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-08 11:57:51 +00:00
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:
parent
7d1fde7438
commit
a508a15f3b
1 changed files with 0 additions and 10 deletions
10
rbf/db.go
10
rbf/db.go
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue