diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 6b759f4..e761496 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,14 +1,7 @@ - - - - - - - - + @@ -111,6 +111,7 @@ - \ No newline at end of file diff --git a/dri/db/auto.go b/dri/db/auto.go index 4137107..65cd02c 100644 --- a/dri/db/auto.go +++ b/dri/db/auto.go @@ -8,7 +8,7 @@ import ( ) func SetDB(appIns *hotime.Application) { - if appIns.Config.GetString("dbType") == "sqlite" || strings.Contains(appIns.Config.GetString("dbName"), ".db") { + if appIns.Config.GetString("dbType") == "sqlite" || strings.Index(appIns.Config.GetString("dbName"), ".db") == len(appIns.Config.GetString("dbName"))-3 { sqlite.SetDB(appIns) } else { mysql.SetDB(appIns)