Merge pull request #16 from singlemancombat/master

Return without info logging if failed to close database.
This commit is contained in:
Dai Jie
2020-04-01 17:17:33 +08:00
committed by GitHub
+1
View File
@@ -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")
}