From 5e65726cb064bab5ae0c00a0cec00ee6fb0adf2d Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Mon, 24 Oct 2022 14:05:50 +0200 Subject: [PATCH] cleanup --- TODO.md | 2 ++ lib/parser.go | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index beac19c..8af36a1 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,7 @@ ## Fixes to be implemented +- highlighting does not repeat, only 1 will be highlighted, see #3 + - rm printYamlData() log.Fatal(), maybe return error on all printers? - refactor parser, there's some duplicate code diff --git a/lib/parser.go b/lib/parser.go index cda33a7..ed81bb0 100644 --- a/lib/parser.go +++ b/lib/parser.go @@ -21,7 +21,6 @@ import ( "bufio" "encoding/csv" "errors" - "fmt" "github.com/alecthomas/repr" "github.com/tlinden/tablizer/cfg" "io" @@ -62,7 +61,7 @@ func parseCSV(c cfg.Config, input io.Reader, pattern string) (Tabdata, error) { } content = strings.NewReader(strings.Join(lines, "\n")) } - fmt.Println(content) + csvreader := csv.NewReader(content) csvreader.Comma = rune(c.Separator[0])