mirror of
https://gitee.com/johng/gf.git
synced 2024-12-02 20:28:17 +08:00
16 lines
293 B
Go
16 lines
293 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/gogf/gf/g"
|
|
)
|
|
|
|
// 使用第二个参数指定读取的配置文件
|
|
func main() {
|
|
c := g.Config()
|
|
redisConfig := c.GetArray("redis-cache", "redis.toml")
|
|
memConfig := c.GetArray("", "memcache.yml")
|
|
fmt.Println(redisConfig)
|
|
fmt.Println(memConfig)
|
|
}
|