You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1Panel/backend/init/db/db.go

17 lines
262 B

package db
import (
"github.com/1Panel-dev/1Panel/backend/global"
"gorm.io/driver/sqlite"
"gorm.io/gorm"
)
func Init() {
s := global.CONF.Sqlite
db, err := gorm.Open(sqlite.Open(s.Dsn()), &gorm.Config{})
if err != nil {
panic(err)
}
global.DB = db
}