From b51ab4680f6c553a1925a135adca1ba3fb696f5b Mon Sep 17 00:00:00 2001 From: suyiiyii Date: Tue, 21 Jan 2025 22:29:34 +0800 Subject: [PATCH] =?UTF-8?q?chore(user):=20=E6=89=93=E5=8D=B0=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在配置加载后打印 RegistryAddress 和 MYSQL_DSN 配置信息 - 用于调试和验证配置是否正确加载 --- app/user/conf/conf.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/user/conf/conf.go b/app/user/conf/conf.go index 049e791..95a5676 100644 --- a/app/user/conf/conf.go +++ b/app/user/conf/conf.go @@ -2,6 +2,7 @@ package conf import ( _ "embed" + "fmt" "github.com/spf13/viper" "os" "sync" @@ -83,6 +84,8 @@ func initConf() { if err != nil { return } + fmt.Println(conf.Registry.RegistryAddress[0]) + fmt.Println(viper.GetString("MYSQL_DSN")) conf.MySQL.DSN = viper.GetString("MYSQL_DSN")