package
Version:
v0.2.20
Opens a new window with list of versions in this module.
Published: Jan 14, 2026
License: MulanPSL-2.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
@author fenglei
Config 支持toml和yaml格式,一次加载一个文件
func GetConfig(configMap map[string]interface{}, key string) interface{}
GetConfig 获取配置
configMap: 配置map(从 NewConfig 返回)
key: 配置键名(不区分大小写)
NewConfig 初始化配置v1版本
configPath: 配置文件路径,支持 .toml、.yaml、.yml 格式
返回配置map,如果需要热更新,配置会自动重新加载到 configMap 中
Source Files
¶
Click to show internal directories.
Click to hide internal directories.