From 0f75554d2d755cbbc7da0c1151b6e98e267ac37b Mon Sep 17 00:00:00 2001 From: Jalon Date: Fri, 24 Nov 2023 12:21:31 +0800 Subject: [PATCH] feat: Add support for synchronizing to xlsx files --- sdk/parse.go | 2 +- sdk/sync.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/parse.go b/sdk/parse.go index f75c55a..6faf43c 100644 --- a/sdk/parse.go +++ b/sdk/parse.go @@ -98,7 +98,7 @@ func parseRowsToXLSX(rows []interface{}, filename string) error { } // ParseRowsToCSV -func parseRowsToCSV(rows []interface{}, filename string) error { +func ParseRowsToCSV(rows []interface{}, filename string) error { // 首先,检查 rows 是否为空 if len(rows) == 0 { return errors.New("rows is empty") diff --git a/sdk/sync.go b/sdk/sync.go index 81a74b9..93a47bc 100644 --- a/sdk/sync.go +++ b/sdk/sync.go @@ -75,7 +75,7 @@ func SyncToFile(mode string, fileName string, api APIConfig) (int64, error) { } switch mode { case "csv": - err = parseRowsToCSV(rows, fileName) + err = ParseRowsToCSV(rows, fileName) case "xlsx": err = parseRowsToXLSX(rows, fileName) default: