mirror of
https://github.com/geektutu/7days-golang.git
synced 2024-04-21 12:32:11 +00:00
Return without info logging if failed to close database.
This commit is contained in:
@@ -43,6 +43,7 @@ func NewEngine(driver, source string) (e *Engine, err error) {
|
||||
func (engine *Engine) Close() {
|
||||
if err := engine.db.Close(); err != nil {
|
||||
log.Error("Failed to close database")
|
||||
return
|
||||
}
|
||||
log.Info("Close database success")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user