fix: the variable has the same name as the package

refactor/fs
Noah Hsu 2022-07-10 16:39:55 +08:00
parent a25d76ef6e
commit 18b218c6c9
1 changed files with 3 additions and 2 deletions

View File

@ -4,6 +4,7 @@ import (
"context"
_ "github.com/alist-org/alist/v3/drivers"
conf2 "github.com/alist-org/alist/v3/internal/conf"
"github.com/alist-org/alist/v3/internal/db"
"github.com/alist-org/alist/v3/internal/model"
"github.com/alist-org/alist/v3/internal/operations"
"github.com/alist-org/alist/v3/pkg/task"
@ -21,11 +22,11 @@ func init() {
panic(err)
}
conf2.Conf.TempDir = absPath
db, err := gorm.Open(sqlite.Open("file::memory:?cache=shared"), &gorm.Config{})
dB, err := gorm.Open(sqlite.Open("file::memory:?cache=shared"), &gorm.Config{})
if err != nil {
panic("failed to connect database")
}
db.Init(db)
db.Init(dB)
}
func TestConnect(t *testing.T) {