|
@@ -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数据库,若无则使用默认数据库
|