Open Q1mi opened 1 year ago
https://www.liwenzhou.com/posts/Go/viper/
李文周的Blog viper 配置管理 go config yaml json etcd Consul toml 配置 热加载
SetConfigType 是用来设置远程源返回的配置类型。例如“json”。
SetConfigName 和 AddConfigPath 搭配起来用,通过指定文件名和路径让viper自行查找配置文件。
SetConfigFile 是用来设置配置文件路径的。
https://www.liwenzhou.com/posts/Go/viper/
李文周的Blog viper 配置管理 go config yaml json etcd Consul toml 配置 热加载