From 5124a64edfbcf43c8d4e9d6c396c2ebc3b31c795 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 29 三月 2024 17:57:16 +0800
Subject: [PATCH] fix

---
 conf/config.go |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/conf/config.go b/conf/config.go
index 52e7f72..3201a3d 100644
--- a/conf/config.go
+++ b/conf/config.go
@@ -23,14 +23,14 @@
 
 type (
 	webConf struct {
-		Host      string // 鏈満ip鍦板潃
-		Port      string // 绔彛鍙�
-		APPort    string // 鏈満浣滀负鐨凣rpc鏈嶅姟绔殑绔彛鍙�
-		AlHost    string // 绠楁硶鏈嶅姟ip鍦板潃
-		AlPort    string // 绠楁硶鏈嶅姟绔彛鍙�
-		NodeId    string // 涓昏处鎴风敤鎴峰悕
-		OssType   string // 瀵硅薄瀛樺偍绫诲瀷
-		JWTSecret string
+		Host    string // 鏈満ip鍦板潃
+		Port    string // 绔彛鍙�
+		APPort  string // 鏈満浣滀负鐨凣rpc鏈嶅姟绔殑绔彛鍙�
+		AlHost  string // 绠楁硶鏈嶅姟ip鍦板潃
+		AlPort  string // 绠楁硶鏈嶅姟绔彛鍙�
+		NodeId  string // 涓昏处鎴风敤鎴峰悕
+		OssType string // 瀵硅薄瀛樺偍绫诲瀷
+		JWTKey  string
 	}
 
 	nsqConf struct {
@@ -41,6 +41,10 @@
 	localConf struct {
 		StorePath string // 鏈湴鏂囦欢瀛樺偍璺緞
 	}
+
+	serviceConf struct {
+		Aps string // 鏈湴鏂囦欢瀛樺偍璺緞
+	}
 )
 
 var (
@@ -49,9 +53,9 @@
 	DbConf    = &mysqlx.Conf{}
 	NsqConf   = &nsqConf{}
 	LocalConf = &localConf{}
-	NodeId    string
 	GrpcPort  string
 	Viper     *viper.Viper
+	Service   = &serviceConf{}
 )
 
 func Init() error {
@@ -107,8 +111,8 @@
 	_ = v.UnmarshalKey("web", WebConf)
 	_ = v.UnmarshalKey("log", LogConf)
 	_ = v.UnmarshalKey("db", DbConf)
-	_ = v.UnmarshalKey("nsq", NsqConf)
 	_ = v.UnmarshalKey("local", LocalConf)
+	_ = v.UnmarshalKey("service", Service)
 	showConfig()
 }
 
@@ -120,5 +124,6 @@
 	log.Printf("   NsqConf:                %+v", NsqConf)
 	log.Printf("   GrpcPort:               %+v", GrpcPort)
 	log.Printf("   LocalConf:               %+v", LocalConf)
+	log.Printf("   ServiceConf:               %+v", Service)
 	log.Println("......................................................")
 }

--
Gitblit v1.8.0