github.com/gogf/gf@v1.16.9/.example/os/gcfg/resource/resource.go (about) 1 package main 2 3 import ( 4 "github.com/gogf/gf/frame/g" 5 _ "github.com/gogf/gf/os/gres/testdata" 6 ) 7 8 func main() { 9 g.Res().Dump() 10 g.Dump(g.Config().Get("redis")) 11 12 g.Config().SetFileName("my.ini") 13 g.Dump(g.Config().Get("redis")) 14 15 g.Config().SetPath("config-custom") 16 g.Config().SetFileName("my.ini") 17 g.Dump(g.Config().Get("redis")) 18 19 g.Config().SetFileName("config.toml") 20 g.Dump(g.Config().Get("redis")) 21 }