From 16b9df3201c202689a3923778f47d93da1a0fb2e Mon Sep 17 00:00:00 2001 From: Colin Henry Date: Thu, 13 Aug 2020 17:26:41 -0700 Subject: [PATCH] removed incompatible package --- pkg/tablatal/doc.go | 1 - pkg/tablatal/tabatal.go | 34 ---------------------------------- 2 files changed, 35 deletions(-) delete mode 100755 pkg/tablatal/doc.go delete mode 100755 pkg/tablatal/tabatal.go diff --git a/pkg/tablatal/doc.go b/pkg/tablatal/doc.go deleted file mode 100755 index 060ffef..0000000 --- a/pkg/tablatal/doc.go +++ /dev/null @@ -1 +0,0 @@ -package tabatal diff --git a/pkg/tablatal/tabatal.go b/pkg/tablatal/tabatal.go deleted file mode 100755 index 5ce2f69..0000000 --- a/pkg/tablatal/tabatal.go +++ /dev/null @@ -1,34 +0,0 @@ -package tabatal - -import ( - "encoding/csv" - "io" - "strings" -) - -func Parse(data string) (a []map[string]interface{}, err error) { - // a := []map[string]interface{}{} - r := csv.NewReader(strings.NewReader(data)) - r.Comma = '\t' - r.Comment = ';' - var header []string - for i := 0; ; i++ { - row, err := r.Read() - if err == io.EOF { - break - } else if err != nil { - return a, err - } - if i == 0 { - header = row - continue - } - - record := map[string]interface{}{} - for i, h := range header { - record[h] = row[i] - } - a = append(a, record) - } - return a, nil -}