You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- package md
-
- type Config struct {
- DB DBCfg `yaml:"db"`
- }
-
- // 数据库配置结构体
- type DBCfg struct {
- Host string `yaml:"host"` //ip及端口
- Name string `yaml:"name"` //库名
- User string `yaml:"user"` //用户
- Psw string `yaml:"psw"` //密码
- ShowLog bool `yaml:"show_log"` //是否显示SQL语句
- MaxLifetime int `yaml:"max_lifetime"`
- MaxOpenConns int `yaml:"max_open_conns"`
- MaxIdleConns int `yaml:"max_idle_conns"`
- Path string `yaml:"path"` //日志文件存放路径
- }
|