Bladeren bron

Merge branch 'master' of ssh://47.108.30.231:8084/gd-backend/gd_adm_data

jason 1 jaar geleden
bovenliggende
commit
02850dc824
2 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  1. 2 2
      conf/common.json
  2. 2 2
      main.go

+ 2 - 2
conf/common.json

@@ -190,7 +190,7 @@
       "scheme": "tcp",
       "update_interval": "60",
       "service_name": "127.0.0.1",
-      "service_port": 40020
+      "service_port": 40050
     },
     "gd_auth_check": {
       "log": {
@@ -330,4 +330,4 @@
   "phone_verification_code":{
     "validity": "5"
   }
-}
+}

+ 2 - 2
main.go

@@ -49,15 +49,14 @@ func showVersion() {
 
 func prepare(appname, projectName, runmode, key, logDir string, etcdAddrs []string, discoveryType string) {
 	var conf *config.Configure
-
 	if discoveryType == "k8s" {
 		conf = config.GetConfigForK8s()
 		if conf == nil {
 			fmt.Printf("get conf failed\n\n")
 			os.Exit(1)
 		}
-	} else {
 
+	} else {
 		// 先行于读配置
 		clinit.InitEtcd(etcdAddrs)
 		utils.SetEtcdKeyApi(clinit.GetEtcdClient())
@@ -66,6 +65,7 @@ func prepare(appname, projectName, runmode, key, logDir string, etcdAddrs []stri
 			fmt.Printf("get conf failed\n\n")
 			os.Exit(1)
 		}
+
 	}
 
 	// 指定mysql数据库,若无则使用默认数据库