refactor(conf): 移除冗余的 mapstructure 结构体标签
This commit is contained in:
1 parent
7f68cecf21
commit
ddf28f59cf
6 files changed
+37
-32
No files matched your search
@@ -4,12 +4,12 @@ import "fmt"
|
||||
|
||||
// DatabaseConfig 定义数据库连接配置结构体
|
||||
type DatabaseConfig struct {
|
||||
Driver string `mapstructure:"driver" yaml:"driver"`
|
||||
Host string `mapstructure:"host" yaml:"host"`
|
||||
Port int `mapstructure:"port" yaml:"port"`
|
||||
User string `mapstructure:"user" yaml:"user"`
|
||||
Password string `mapstructure:"password" yaml:"password"`
|
||||
Dbname string `mapstructure:"dbname" yaml:"dbname"`
|
||||
Driver string `yaml:"driver"`
|
||||
Host string `yaml:"host"`
|
||||
Port int `yaml:"port"`
|
||||
User string `yaml:"user"`
|
||||
Password string `yaml:"password"`
|
||||
Dbname string `yaml:"dbname"`
|
||||
}
|
||||
|
||||
// Dsn 根据 driver 动态生成 DSN 字符串
|
||||
|
||||
Reference in new issue
Block a user