- 授权协议: MIT
- 开发语言: Google Go
- 操作系统: 跨平台
- 软件首页: https://github.com/syyongx/cconf
- 软件文档: http://www.syyong.com/Go/Cconf---a-lightweight-config-library-for-Go-implementation.html
- 官方下载: https://github.com/syyongx/cconf/releases
软件介绍
go-conf 是使用 Go 实现的一个轻量级的 config 库,参考了 ozzo-config 的设计,但具有更优的性能和支持动态移植配置的功能。
go-conf 采用 MIT 开源协议。
下载安装
go get github.com/syyongx/cconf
功能
从配置文件中读取配置,默认支持 JSON 格式文件,提供了接口,也可非常方便地扩展支持其他格式配置文件;
可将一个 go 的结构体数据直接动态移植到 config 实例中;
不需要提前构建结构体就可以直接获取你想要的数据;
快速开始
import github.com/syyongx/cconf
func main() {
c := cconf.New()
age := c.GetInt("age", 18)
name := c.Get("name").(string)
c.Set("email", "default@default.com")
email := c.GetString("email")
}接口
New() *Conf
RegisterLoadFunc(typ string, fn loadFunc)
Load(files ...string) error
LoadWithPattern(pattern string) error
Set(key string, val interface{}) error
Get(key string, def ...interface{}) interface{}
GetString(key string, def ...string) string
GetInt(key string, def ...int) int
GetInt64(key string, def ...int64) int64
GetFloat(key string, def ...float64) float64
GetBool(key string, def ...bool) bool
SetStore(data ...interface{})
GetStore() interface{}
Register(name string, provider interface{}) error
Populate(v interface{}, key ...string) (err error)
iPhone开发实战
2009-10 / 69.00元
《iPhone开发实战》全面探讨了iPhone平台的两种编程方式——Web开发和SDK编程。全书结合示例对这两种编程方式的基本流程、基本原理和基本原则给出了详细而通俗的讲解。在Web开发方面,分别介绍了三个iPhone Web库,即WebKit、iUI和Canvas,并讨论了Web开发环境Dashcode,最后阐述Web应用程序的调试。在SDK开发方面,详细描述其各种组件和功能,包括Xcode、I......一起来看看 《iPhone开发实战》 这本书的介绍吧!
