增加批量读取配置 TODO : 待完成

This commit is contained in:
2022-06-11 17:49:43 +08:00
parent 9377cd288f
commit e610e02d45
4 changed files with 46 additions and 13 deletions

View File

@ -13,6 +13,8 @@ import (
"strings"
"sync"
"git.zhangdeman.cn/zhangdeman/util"
"git.zhangdeman.cn/zhangdeman/logger/wrapper"
"github.com/gin-gonic/gin"
@ -83,12 +85,14 @@ func (c *client) getMysqlCfgFileList(cfgDir string) ([]cfgFile, error) {
Path: filepathNames[i],
Type: FileTypeYaml,
})
util.File.ReadYmlConfig()
case FileTypeJson:
cfgFileList = append(cfgFileList, cfgFile{
Path: filepathNames[i],
Type: FileTypeJson,
})
default:
// 不是JSON , 也不是YML, 跳过
continue
}
}