package md import "time" //数据库配置结构体 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 time.Duration `yaml:"max_lifetime"` MaxOpenConns int `yaml:"max_open_conns"` MaxIdleConns int `yaml:"max_idle_conns"` Path string `yaml:"path"` //日志文件存放路径 }