没有合适的资源?快使用搜索试试~ 我知道了~
configuration:用于从环境,标志,文件或默认标签为结构的字段设置值的库
共25个文件
go:16个
yml:2个
json:1个
需积分: 8 0 下载量 21 浏览量
2021-03-14
13:50:09
上传
评论
收藏 19KB ZIP 举报
温馨提示
配置 是一个用于将值递归注入结构的库-一种设置配置对象的便捷方法。 可用功能: 设置结构字段的默认值NewDefaultProvider() 从环境变量设置值NewEnvProvider() 从命令行标志设置值NewFlagProvider(&cfg) 设置文件(JSON或YAML)中的值NewFileProvider("./testdata/input.yml") 支持的类型: string , *string , []string bool , *bool , []bool 这些类型的int , int8 , int16 , int32 , int64 +切片 *int , *int8 , *int16 , *int32 , *int64 uint , uint8 , uint16 , uint32 , uint64 +这些类型的切片 *uint , *uint8 ,
资源推荐
资源详情
资源评论
收起资源包目录
configuration-master.zip (25个子文件)
configuration-master
testdata
input.json 86B
input.yml 74B
input.yaml 39B
fieldStetter_test.go 10KB
flagProvider.go 3KB
envProvider.go 668B
.github
workflows
go.yml 645B
tagGetters_test.go 1KB
defaultProvider.go 487B
interfaces.go 222B
configurator_test.go 4KB
errors.go 91B
LICENSE 1KB
envProvider_test.go 1KB
fileProvider.go 2KB
fieldSetter.go 5KB
flagProvider_test.go 3KB
.gitignore 192B
fileProvider_test.go 4KB
Makefile 190B
defaultProvider_test.go 2KB
tagGetters.go 352B
README.md 5KB
configurator.go 3KB
go.mod 126B
共 25 条
- 1
资源评论
佐罗先生
- 粉丝: 31
- 资源: 4750
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功