Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitConfig ¶
func InitConfig(filename string)
Types ¶
type Config ¶
type Config struct { Env string `yaml:"Env"` // 环境:prod、dev BaseUrl string `yaml:"BaseUrl"` // base url Port string `yaml:"Port"` // 端口 LogFile string `yaml:"LogFile"` // 日志文件 MySqlUrl string `yaml:"MySqlUrl"` // 数据库连接地址 MaxIdleConns int `yaml:"MaxIdleConns"` MaxOpenConns int `yaml:"MaxOpenConns"` ShowSql bool `yaml:"ShowSql"` // 是否显示日志 }
var Conf *Config
Click to show internal directories.
Click to hide internal directories.