From d72710bc8e00829eeabf2db4b9dfd1b062b48855 Mon Sep 17 00:00:00 2001 From: wangjian Date: Fri, 24 Mar 2023 08:49:41 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E6=94=B9consul=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E6=B3=A8=E5=86=8C=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/server.go | 2 +- model/index.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/server.go b/cmd/server.go index 82d7bec..f9920ad 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -77,7 +77,7 @@ func NewStartCmd() *cobra.Command { //创建注册对象 tags := make([]string, 1) tags[0] = "control" - consulCfg, err := discover.NewConsulConfig(cfg.Consul.Host, cfg.Name, cfg.Name, cfg.Consul.Host, cfg.Consul.Port, + consulCfg, err := discover.NewConsulConfig(fmt.Sprintf("%s:%d", cfg.Consul.Host, cfg.Consul.Port), cfg.Name, cfg.Name, cfg.Consul.Host, cfg.Consul.Port, tags, 300, 300, 300) must(err) diff --git a/model/index.go b/model/index.go index 268b07a..4e5c9dc 100644 --- a/model/index.go +++ b/model/index.go @@ -1,6 +1,7 @@ package model import ( + "fmt" "go.uber.org/zap" "os" @@ -26,6 +27,7 @@ func New(driveName, dsn string, showSql bool) { &TaskResult{}, ) if err != nil { + fmt.Println("同步数据库表结构", err) zap.L().Error("同步数据库表结构", zap.Error(err)) os.Exit(1) }