style: 导出日志增加已导出的表信息

This commit is contained in:
kercylan98 2023-07-05 13:28:25 +08:00
parent 65aac67cf4
commit 741da79d60
4 changed files with 34 additions and 18 deletions

View File

@ -51,6 +51,12 @@ func New(xlsxPath string) *ConfigExport {
}
ce.configs = append(ce.configs, config)
ce.exist[config.Name] = true
log.Info("ConfigExport",
zap.String("File", xlsxPath),
zap.String("Sheet", sheet.Name),
zap.String("Info", "Export successfully"),
)
}
}
return ce

View File

@ -6,8 +6,8 @@
},
"Other": {
"0": {
"name": "张飞",
"id": 1
"id": 1,
"name": "张飞"
},
"1": {
"id": 2,

View File

@ -1,4 +1,12 @@
{
"0": {
"": {
"Award": null,
"Other": null,
"Id": 0,
"Count": ""
}
},
"1": {
"b": {
"Id": 1,
@ -21,21 +29,21 @@
},
"2": {
"c": {
"Id": 2,
"Count": "c",
"Award": {
"0": "asd",
"1": "12"
},
"Other": {
"0": {
"id": 1,
"name": "张飞"
},
"1": {
"name": "刘备",
"id": 2
"id": 2,
"name": "刘备"
}
},
"Id": 2,
"Count": "c",
"Award": {
"0": "asd",
"1": "12"
}
},
"d": {
@ -46,13 +54,13 @@
"1": "12"
},
"Other": {
"1": {
"id": 2,
"name": "刘备"
},
"0": {
"id": 1,
"name": "张飞"
},
"1": {
"id": 2,
"name": "刘备"
}
}
}

View File

@ -12,11 +12,13 @@ var json = jsonIter.ConfigCompatibleWithStandardLibrary
var full map[string]any
var (
// IndexConfig 有索引
IndexConfig map[int]map[string]*IndexConfigDefine
_IndexConfig map[int]map[string]*IndexConfigDefine
IndexConfigSign = "IndexConfig"
IndexConfig map[int]map[string]*IndexConfigDefine
_IndexConfig map[int]map[string]*IndexConfigDefine
// EasyConfig 无索引
EasyConfig *EasyConfigDefine
_EasyConfig *EasyConfigDefine
EasyConfigSign = "EasyConfig"
EasyConfig *EasyConfigDefine
_EasyConfig *EasyConfigDefine
)
func LoadConfig(handle func(filename string, config any) error) {