code refactor

This commit is contained in:
MaysWind
2024-06-17 00:22:32 +08:00
parent db71ac5279
commit 226d44651f
3 changed files with 13 additions and 6 deletions
+3 -1
View File
@@ -9,7 +9,9 @@ type EzBookKeepingCSVFileExporter struct {
EzBookKeepingPlainFileExporter
}
const csvSeparator = ","
// ToExportedContent returns the exported CSV data
func (e *EzBookKeepingCSVFileExporter) ToExportedContent(uid int64, transactions []*models.Transaction, accountMap map[int64]*models.Account, categoryMap map[int64]*models.TransactionCategory, tagMap map[int64]*models.TransactionTag, allTagIndexs map[int64][]int64) ([]byte, error) {
return e.toExportedContent(uid, ",", transactions, accountMap, categoryMap, tagMap, allTagIndexs)
return e.toExportedContent(uid, csvSeparator, transactions, accountMap, categoryMap, tagMap, allTagIndexs)
}