遇到错误报panic

This commit is contained in:
Yun
2024-03-13 14:27:42 +08:00
parent b3a11e616b
commit bdee09059b
2 changed files with 9 additions and 10 deletions
+1 -4
View File
@@ -9,10 +9,7 @@ import (
func TestViper(t *testing.T) {
var data Config
err := viperx.InitConfig("./config.yml", &data)
if err != nil {
panic(err)
}
viperx.InitConfig("./config.yml", &data)
fmt.Println(data)
}