diff --git a/cmd/n26/csv.go b/cmd/n26/csv.go index fc2c74d..3bcf1b6 100644 --- a/cmd/n26/csv.go +++ b/cmd/n26/csv.go @@ -13,6 +13,7 @@ func NewCsvWriter(target io.Writer) (*csvWriter, error) { writer := csv.NewWriter(target) return &csvWriter{writer}, nil } + func (w *csvWriter) WriteData(header []string, data [][]string) error { if err := w.Write(header); err != nil { return err diff --git a/cmd/n26/json.go b/cmd/n26/json.go index beee4d6..672bd7c 100644 --- a/cmd/n26/json.go +++ b/cmd/n26/json.go @@ -3,6 +3,7 @@ package main import ( "encoding/json" "fmt" + "github.com/guitmz/n26" ) diff --git a/cmd/n26/table.go b/cmd/n26/table.go index 532688d..44e6dc0 100644 --- a/cmd/n26/table.go +++ b/cmd/n26/table.go @@ -1,8 +1,9 @@ package main import ( - "github.com/olekukonko/tablewriter" "os" + + "github.com/olekukonko/tablewriter" ) type tblWriter struct { @@ -12,6 +13,7 @@ type tblWriter struct { func NewTableWriter() *tblWriter { return &tblWriter{tablewriter.NewWriter(os.Stdout)} } + func (table *tblWriter) WriteData(header []string, data [][]string) error { table.SetHeader(header) table.AppendBulk(data)