Skip to content

Commit

Permalink
Trim double column seps from row titles
Browse files Browse the repository at this point in the history
Signed-off-by: R.I.Pienaar <[email protected]>
  • Loading branch information
ripienaar committed Aug 8, 2023
1 parent fed3450 commit 21b6bc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion columns/columns.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (w *Writer) Render() (string, error) {

// AddRow adds a row, v will be formatted if time.Time, time.Duration, []string, floats, ints and uints
func (w *Writer) AddRow(t string, v any) {
w.rows = append(w.rows, &columnRow{kind: kindRow, values: []any{t, F(v)}})
w.rows = append(w.rows, &columnRow{kind: kindRow, values: []any{strings.TrimSuffix(t, w.sep), F(v)}})
}

// AddRowIf adds a row if the condition is true
Expand Down

0 comments on commit 21b6bc4

Please sign in to comment.