Documentation ¶ Index ¶ func Load() type AppConfig type RpcConfig type ServerConfig Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Load ¶ func Load() Load 导入配置和参数 Types ¶ type AppConfig ¶ type AppConfig struct { Server *ServerConfig `yaml:"server"` Rpc *RpcConfig `yaml:"rpc"` } var AppCfg *AppConfig type RpcConfig ¶ type RpcConfig struct { Addr string `yaml:"addr"` Initial int `yaml:"initial"` MaxOpen int `yaml:"max-open"` MaxIdle int `yaml:"max-idle"` MaxLifeTime int `yaml:"max-life-time"` MaxIdleTime int `yaml:"max-idle-time"` } type ServerConfig ¶ type ServerConfig struct { Host string `yaml:"host"` Port int `yaml:"port"` } Source Files ¶ View all Source files config.go Click to show internal directories. Click to hide internal directories.