fix: disable default db name

This commit is contained in:
hexxa 2022-01-29 14:09:24 +08:00 committed by Hexxa
parent 00bbb12843
commit 39d644931c
3 changed files with 6 additions and 4 deletions

View file

@ -16,7 +16,6 @@ import (
var (
ErrBucketNotFound = errors.New("bucket not found")
DBName = "quickshare.db"
)
type BoltPvd struct {
@ -26,7 +25,7 @@ type BoltPvd struct {
}
func New(dbPath string, maxStrLen int) *BoltPvd {
boltPath := path.Join(path.Clean(dbPath), DBName)
boltPath := path.Clean(dbPath)
db, err := bolt.Open(boltPath, 0600, &bolt.Options{Timeout: 1 * time.Second})
if err != nil {
panic(err)