gf/example/config/kubecm/main.go
2022-09-26 22:11:13 +08:00

22 lines
397 B
Go

package main
import (
_ "github.com/gogf/gf/example/config/kubecm/boot_in_pod"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
)
func main() {
var ctx = gctx.GetInitCtx()
// Available checks.
g.Dump(g.Cfg().Available(ctx))
// All key-value configurations.
g.Dump(g.Cfg().Data(ctx))
// Retrieve certain value by key.
g.Dump(g.Cfg().MustGet(ctx, "server.address"))
}