File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ type GeneralDB struct {
12
12
Path string `mapstructure:"path" json:"path" yaml:"path"` // 服务器地址:端口
13
13
Port string `mapstructure:"port" json:"port" yaml:"port"` //:端口
14
14
Config string `mapstructure:"config" json:"config" yaml:"config"` // 高级配置
15
- AliasName string `mapstructure:"alias-name" json:"alias-name" yaml:"alias-name"` // 在多数据库中 生效
16
15
Dbname string `mapstructure:"db-name" json:"db-name" yaml:"db-name"` // 数据库名
17
16
Username string `mapstructure:"username" json:"username" yaml:"username"` // 数据库用户名
18
17
Password string `mapstructure:"password" json:"password" yaml:"password"` // 数据库密码
Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ func DBList() {
16
16
}
17
17
switch info .Type {
18
18
case "mysql" :
19
- dbMap [info .GeneralDB . AliasName ] = GormMysqlByConfig (config.Mysql {GeneralDB : info .GeneralDB })
19
+ dbMap [info .AliasName ] = GormMysqlByConfig (config.Mysql {GeneralDB : info .GeneralDB })
20
20
case "pgsql" :
21
- dbMap [info .GeneralDB . AliasName ] = GormPgSqlByConfig (config.Pgsql {GeneralDB : info .GeneralDB })
21
+ dbMap [info .AliasName ] = GormPgSqlByConfig (config.Pgsql {GeneralDB : info .GeneralDB })
22
22
default :
23
23
continue
24
24
}
You can’t perform that action at this time.
0 commit comments