mirror of
https://gitee.com/johng/gf.git
synced 2024-12-02 04:07:47 +08:00
22 lines
397 B
Go
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"))
|
|
}
|