From c04bd94e67863345a76d2f8c97f71d4e19d73500 Mon Sep 17 00:00:00 2001 From: lijun Date: Tue, 14 Jan 2025 15:36:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- proto/conf.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/proto/conf.go b/proto/conf.go index e1b1dfa..e21fa8a 100644 --- a/proto/conf.go +++ b/proto/conf.go @@ -76,11 +76,14 @@ func ReadConfig(path string) error { } } //将配置写入redis - json_data, err := json.Marshal(Config) - worker.SetRedis("vp_stream_config", string(json_data)) + jsonData, err2 := json.Marshal(Config) + if err2 != nil { + fmt.Println("ReadConfigToSetSystem Error encoding config,err :", err2) + } + worker.SetRedis("vp_stream_config", string(jsonData)) SigningKey = []byte(Config.TOKEN_SECRET) if Config.TOKEN_SECRET == "" { - err = fmt.Errorf("token secret is empty") + err = fmt.Errorf("token secret is empty," + string(jsonData)) } return err }