| Conditions | 3 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | package exportdata |
||
| 17 | func NewExport(exportType string, rows *sql.Rows, exportPath string, bar *progressbar.ProgressBar) (exportdata.Export, error) { |
||
| 18 | switch exportType { |
||
| 19 | case CsvLineExportType: |
||
| 20 | return csv.NewCsvExport(rows, exportPath, bar), nil |
||
| 21 | case JsonLineExportType: |
||
| 22 | return jsonl.NewJsonlExport(rows, exportPath, bar), nil |
||
| 23 | } |
||
| 24 | |||
| 25 | return nil, fmt.Errorf("export type %s not defined", exportType) |
||
| 26 | } |
||
| 27 |