Open 347255699 opened 4 years ago
https://www.menfre.info/2020/04/28/viper/
Viper 是 Golang 中用于加载配置文件的框架,兼容多种格式的配置文件。这里兼容多种文件意思是说你无需告诉 Viper 你的配置文件是什么格式,它会自己识别和加载。
Quick Start:
go get github.com/spf13/vipe
假设我们有一个 JSON 配置文件。
{ "port": 10666, "mysql ...
路过
@sweetpotatoman 路过
很奇怪,这个 gitalk 不是很稳定。
https://www.menfre.info/2020/04/28/viper/
Viper 是 Golang 中用于加载配置文件的框架,兼容多种格式的配置文件。这里兼容多种文件意思是说你无需告诉 Viper 你的配置文件是什么格式,它会自己识别和加载。
Quick Start:
go get github.com/spf13/vipe
假设我们有一个 JSON 配置文件。
{ "port": 10666, "mysql ...