chore(user): 打印配置信息
- 在配置加载后打印 RegistryAddress 和 MYSQL_DSN 配置信息 - 用于调试和验证配置是否正确加载
This commit is contained in:
parent
9927dbcb94
commit
b51ab4680f
@ -2,6 +2,7 @@ package conf
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
_ "embed"
|
_ "embed"
|
||||||
|
"fmt"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"os"
|
"os"
|
||||||
"sync"
|
"sync"
|
||||||
@ -83,6 +84,8 @@ func initConf() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
fmt.Println(conf.Registry.RegistryAddress[0])
|
||||||
|
fmt.Println(viper.GetString("MYSQL_DSN"))
|
||||||
|
|
||||||
conf.MySQL.DSN = viper.GetString("MYSQL_DSN")
|
conf.MySQL.DSN = viper.GetString("MYSQL_DSN")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user