1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-02-01 13:07:48 +02:00

fix(examples): rename config to cfg in blog (#1122)

This commit is contained in:
包子 2021-06-29 14:57:15 +08:00 committed by GitHub
parent 725d60134c
commit 493c11929f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,17 +71,17 @@ func main() {
flag.Parse()
logger := log.NewStdLogger(os.Stdout)
config := config.New(
cfg := config.New(
config.WithSource(
file.NewSource(flagconf),
),
)
if err := config.Load(); err != nil {
if err := cfg.Load(); err != nil {
panic(err)
}
var bc conf.Bootstrap
if err := config.Scan(&bc); err != nil {
if err := cfg.Scan(&bc); err != nil {
panic(err)
}
tp, err := tracerProvider(bc.Trace.Endpoint)