fixed linter warnings

This commit is contained in:
2024-12-18 18:51:50 +01:00
parent feb9032d28
commit 3eab9efc13
4 changed files with 8 additions and 7 deletions

View File

@@ -38,7 +38,9 @@ const BucketData string = "data"
func New(file string, debug bool) (*DB, error) {
if _, err := os.Stat(filepath.Dir(file)); os.IsNotExist(err) {
os.MkdirAll(filepath.Dir(file), 0700)
if err := os.MkdirAll(filepath.Dir(file), 0700); err != nil {
return nil, err
}
}
return &DB{Debug: debug, Dbfile: file}, nil