Skip to content

Commit

Permalink
Standardizing newline output
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshaw committed Nov 19, 2021
1 parent 7f0ef1b commit 9cf97d8
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 16 deletions.
12 changes: 0 additions & 12 deletions encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,6 @@ func (enc *TableEncoder) EncodeAll(w io.Writer) error {
return err
}
}
if _, err := w.Write(enc.newline); err != nil {
return err
}
return nil
}

Expand Down Expand Up @@ -719,9 +716,6 @@ func (enc *ExpandedEncoder) EncodeAll(w io.Writer) error {
return err
}
}
if _, err := w.Write(enc.newline); err != nil {
return err
}
return nil
}

Expand Down Expand Up @@ -1136,9 +1130,6 @@ func (enc *UnalignedEncoder) EncodeAll(w io.Writer) error {
return err
}
}
if _, err := w.Write(enc.newline); err != nil {
return err
}
return nil
}

Expand Down Expand Up @@ -1276,9 +1267,6 @@ func (enc *TemplateEncoder) EncodeAll(w io.Writer) error {
return err
}
}
if _, err := w.Write(enc.newline); err != nil {
return err
}
return nil
}

Expand Down
4 changes: 0 additions & 4 deletions tblfmt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ func TestEncodeTableAll(t *testing.T) {
║ ║ ║ ] ║
╚══════════════════════╩═══════════════════════════╩════════════════════════════╝
(8 rows)
`
buf := new(bytes.Buffer)
if err := EncodeTableAll(buf, internal.NewRsetMulti(), WithBorder(2), WithLineStyle(UnicodeDoubleLineStyle()), WithTitle("my table"), WithWidths(20, 20)); err != nil {
Expand Down Expand Up @@ -195,7 +194,6 @@ Row 7:
"a",
"b"
]"
`
tpl := `{{ $headers := .Headers }}{{ range $i, $r := .Rows }}Row {{ $i }}:{{ range $j, $c := $r }}
{{ index $headers $j }} = "{{ $c }}"{{ end }}
Expand Down Expand Up @@ -255,7 +253,6 @@ test
"a",
"b"
]
`
buf := new(bytes.Buffer)
if err := EncodeUnalignedAll(buf, internal.NewRsetMulti()); err != nil {
Expand Down Expand Up @@ -312,7 +309,6 @@ test
""a"",
""b""
]"
`
buf := new(bytes.Buffer)
if err := EncodeCSVAll(buf, internal.NewRsetMulti()); err != nil {
Expand Down
Binary file modified testdata/big.gz
Binary file not shown.
Binary file modified testdata/multi.gz
Binary file not shown.
Binary file modified testdata/tiny.gz
Binary file not shown.
Binary file modified testdata/wide.gz
Binary file not shown.

0 comments on commit 9cf97d8

Please sign in to comment.