feat:Extract global configuration
This commit is contained in:
1 parent
a6970e9c67
commit
bfbc5081ea
15 files changed
+155
-207
No files matched your search
@@ -1,10 +1,8 @@
|
||||
package database
|
||||
|
||||
import "go-admin/tools/config"
|
||||
|
||||
|
||||
func Setup() {
|
||||
dbType := config.DatabaseConfig.DbType
|
||||
func Setup(driver string) {
|
||||
dbType := driver
|
||||
if dbType == "mysql" {
|
||||
var db = new(Mysql)
|
||||
db.Setup()
|
||||
|
||||
Reference in new issue
Block a user