Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Conf = new(Config)
全局变量,用来保存程序的所有配置信息
Functions ¶
Types ¶
type Config ¶
type Config struct { *AppConfig `mapstructure:"app"` *LogConfig `mapstructure:"log"` *MySQLConfig `mapstructure:"mysql"` *RedisConfig `mapstructure:"redis"` }
使用结构体变量报错配置信息
type MySQLConfig ¶
type MySQLConfig struct { Host string `mapstructure:"host"` User string `mapstructure:"user"` Password string `mapstructure:"password"` DbName string `mapstructure:"dbname"` Port int `mapstructure:"port"` MaxOpenConns int `mapstructure:"max_open_conns"` MaxIdleConns int `mapstructure:"max_idle_conns"` }
Click to show internal directories.
Click to hide internal directories.