package main
import (
"fmt"
"github.com/gogf/gf/v2/os/gcfg"
"github.com/gogf/gf/v2/os/gctx"
)
func main() {
var ctx = gctx.New()
adapter, err := gcfg.NewAdapterFile("config")
if err != nil {
panic(err)
}
config := gcfg.NewWithAdapter(adapter)
fmt.Println(config.MustGet(ctx, "server.address").String())
fmt.Println(config.MustGet(ctx, "database.default").Map())
}