Exemple #1
0
func Demo() {
	var c mconf.Config = mconf.NewConfig(ini.NewIniConfig("../data/demo.ini", "../data/demo2.ini"))
	c.Put("put", "temp put")
	demo.DemoConfig(c)
	fmt.Println(c.GetString("put"))
}
Exemple #2
0
// Config api Demo
func DemoConfig(mconf mconf.Config) {
	//should be false
	fmt.Println("IsContain('no-exist'):", mconf.IsContain("no-exist"))
	fmt.Println("GetString('db.spec'):", mconf.GetString("db.spec"))
	fmt.Println("GetString('db2.spec'):", mconf.GetString("db2.spec"))
}