force header option

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2025-09-27 19:31:51 +02:00
parent 2af61b3085
commit 9950157ad5
2 changed files with 20 additions and 3 deletions

View File

@@ -13,7 +13,7 @@ import (
"github.com/charmbracelet/log"
)
func CsvToParquet(lu settings.LeakUtils, inputFile string, outputFile string, strict bool) error {
func CsvToParquet(lu settings.LeakUtils, inputFile string, outputFile string, strict, forceHeader bool) error {
delimiter := getDelimiter(inputFile)
hasHeader, err := csvHasHeader(inputFile, delimiter)
@@ -21,7 +21,7 @@ func CsvToParquet(lu settings.LeakUtils, inputFile string, outputFile string, st
return err
}
header := "true"
if !hasHeader {
if !hasHeader && !forceHeader {
header = "false"
}
strictMode := "true"