diff --git a/planner/configexport/internal/export.go b/planner/configexport/internal/export.go deleted file mode 100644 index 008ab8d..0000000 --- a/planner/configexport/internal/export.go +++ /dev/null @@ -1,46 +0,0 @@ -package internal - -import ( - "fmt" - "github.com/kercylan98/minotaur/utils/file" - "github.com/kercylan98/minotaur/utils/log" - "github.com/tealeg/xlsx" - "go.uber.org/zap" - "path/filepath" - "runtime/debug" - "sync" -) - -func ExportJSON(xlsxPath string, output string) { - xlsxFile, err := xlsx.OpenFile(xlsxPath) - if err != nil { - panic(err) - } - var errors []func() - var wait sync.WaitGroup - for _, sheet := range xlsxFile.Sheets { - sheet := sheet - go func() { - defer func() { - if err := recover(); err != nil { - errors = append(errors, func() { - log.Error("导出失败", zap.String("名称", xlsxPath), zap.String("Sheet", sheet.Name), zap.Any("err", err)) - fmt.Println(debug.Stack()) - }) - } - }() - wait.Add(1) - config := NewConfig(sheet) - if err := file.WriterFile(filepath.Join(output, fmt.Sprintf("%s.json", config.GetName())), config.GetJSON()); err != nil { - panic(err) - } - wait.Done() - }() - } - - wait.Wait() - - for _, f := range errors { - f() - } -} diff --git a/planner/configexport/internal/export_go.go b/planner/configexport/internal/export_go.go deleted file mode 100644 index 5bf0569..0000000 --- a/planner/configexport/internal/export_go.go +++ /dev/null @@ -1 +0,0 @@ -package internal diff --git a/planner/configexport/internal/internal/defines.go b/planner/configexport/internal/internal/defines.go deleted file mode 100644 index 5db08d7..0000000 --- a/planner/configexport/internal/internal/defines.go +++ /dev/null @@ -1,22 +0,0 @@ -package internal - -type XXConfig struct { - Id int - Count string - Award map[int]string - Info *struct { - Id int - Name string - Info *struct { - Lv int - Exp *struct { - Mux int - Count int - } - } - } - Other *struct { - Id int - Name string - } -}