fix: disable default db name
This commit is contained in:
parent
00bbb12843
commit
39d644931c
3 changed files with 6 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue