fix: close db on shutdown
This commit is contained in:
parent
1dd4fa22cd
commit
78ee15cf4b
6
db/db.go
6
db/db.go
|
@ -63,3 +63,9 @@ func Init() {
|
|||
func Get() *gorm.DB {
|
||||
return db
|
||||
}
|
||||
func Close() error {
|
||||
|
||||
instance, _ := db.DB()
|
||||
|
||||
return instance.Close()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue