【文件属性】:
文件名称:goini:golang读取ini配置文件
文件大小:8KB
文件格式:ZIP
更新时间:2021-05-15 15:01:41
Go
goini
##描述
使用goini更简单的读取go的ini配置文件以及根据特定格式的各种配置文件。
##安装方法
gp get github.com/widuu/goini
##使用方法
ini配置文件格式样列
[database]
username = root
password = password
hostname = localhost
[admin]
username = root
password = password
[nihao]
username = root
password = password
初始化
conf := goini.SetConfig("./conf/conf.ini") //goini.SetConfig(filepath) 其中filepath是你ini 配置文件的所在位置
获取单个配置信息
username := conf.GetValue("
【文件预览】:
goini-master
----.travis.yml(113B)
----conf()
--------database.ini(0B)
--------conf.ini(157B)
----LICENSE(10KB)
----conf.go(3KB)
----conf_test.go(563B)
----README.md(3KB)