From 4fc201977057516c16603eb674a0082c97b136a8 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Fri, 6 Dec 2024 10:15:17 +0800 Subject: [PATCH] update statistics --- statistics/main.go | 6 +++--- statistics/task/main.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/statistics/main.go b/statistics/main.go index 23e6b9f..c738b31 100644 --- a/statistics/main.go +++ b/statistics/main.go @@ -68,9 +68,9 @@ func DoTickPlatform(ctx context.Context, wg *sync.WaitGroup, duration time.Durat } func main() { - VP = viperx.GetViper("config", "yaml") + VP = viperx.GetViper("config.yaml") // mongo - vp := viperx.GetViper("mongo", "yaml") + vp := viperx.GetViper("mongo.yaml") // mongo初始化 conf := &mongox.Config{} err := vp.Unmarshal(conf) @@ -81,7 +81,7 @@ func main() { defer mongox.Close() // mysql - vp = viperx.GetViper("mysql", "yaml") + vp = viperx.GetViper("mysql.yaml") myConf := &mysqlx.Config{} err = vp.Unmarshal(myConf) if err != nil { diff --git a/statistics/task/main.go b/statistics/task/main.go index a582273..bb555b8 100644 --- a/statistics/task/main.go +++ b/statistics/task/main.go @@ -35,9 +35,9 @@ func main() { logger.Logger.Flush() logger.Logger.Close() }() - VP = viperx.GetViper("config", "yaml") + VP = viperx.GetViper("config.yaml") // mongo - vp := viperx.GetViper("mongo", "yaml") + vp := viperx.GetViper("mongo.yaml") // mongo初始化 conf := &mongox.Config{} err := vp.Unmarshal(conf) @@ -48,7 +48,7 @@ func main() { defer mongox.Close() // mysql - vp = viperx.GetViper("mysql", "yaml") + vp = viperx.GetViper("mysql.yaml") myConf := &mysqlx.Config{} err = vp.Unmarshal(myConf) if err != nil {