347255699 / my-blog

新博客
0 stars 0 forks source link

Viper 入门 | Menfre Blog #4

Open 347255699 opened 4 years ago

347255699 commented 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 commented 4 years ago

路过

347255699 commented 4 years ago

@sweetpotatoman 路过

很奇怪,这个 gitalk 不是很稳定。