修复在线修改系统配置的bug

This commit is contained in:
Leonard Wang
2021-05-12 00:54:07 +08:00
parent 8159aa1a88
commit 447d824da6
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -36,6 +36,7 @@ func Viper(path ...string) *viper.Viper {
v := viper.New()
v.SetConfigFile(config)
v.SetConfigType("yaml")
err := v.ReadInConfig()
if err != nil {
panic(fmt.Errorf("Fatal error config file: %s \n", err))