chore(user): 打印配置信息

- 在配置加载后打印 RegistryAddress 和 MYSQL_DSN 配置信息
- 用于调试和验证配置是否正确加载
This commit is contained in:
suyiiyii 2025-01-21 22:29:34 +08:00
parent 9927dbcb94
commit b51ab4680f
Signed by: suyiiyii
GPG Key ID: 044704CB29B8AD85

View File

@ -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")