mirror of
https://gitee.com/johng/gf
synced 2026-07-06 13:42:46 +08:00
17 lines
300 B
Go
17 lines
300 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/gogf/gf/frame/g"
|
|
)
|
|
|
|
// 使用第二个参数指定读取的配置文件
|
|
func main() {
|
|
c := g.Config()
|
|
redisConfig := c.GetArray("redis-cache", "redis.toml")
|
|
memConfig := c.GetArray("", "memcache.yml")
|
|
fmt.Println(redisConfig)
|
|
fmt.Println(memConfig)
|
|
}
|