forked from ccfos/nightingale
17 lines
221 B
Go
17 lines
221 B
Go
|
package storage
|
||
|
|
||
|
import (
|
||
|
"github.com/ccfos/nightingale/v6/pkg/ormx"
|
||
|
|
||
|
"gorm.io/gorm"
|
||
|
)
|
||
|
|
||
|
func New(cfg ormx.DBConfig) (*gorm.DB, error) {
|
||
|
db, err := ormx.New(cfg)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
return db, nil
|
||
|
}
|