-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Description
Hi, How can I add a row line on the top of footer?
func main() {
t := table.New(os.Stdout)
t.SetDividers(table.ASCIIDividers)
t.SetRowLines(false)
t.SetHeaders("ID", "Fruit", "Stock")
t.AddRow("1", "Apple", "14")
t.AddRow("2", "Banana", "88,041")
t.AddRow("3", "Cherry", "342")
t.AddRow("4", "Dragonfruit", "1")
t.AddFooters("", "Count", "4")
t.Render()
}
Output
+----+-------------+--------+
| ID | Fruit | Stock |
+----+-------------+--------+
| 1 | Apple | 14 |
| 2 | Banana | 88,041 |
| 3 | Cherry | 342 |
| 4 | Dragonfruit | 1 |
| | Count | 4 |
+----+-------------+--------+
Which I need:
+----+-------------+--------+
| ID | Fruit | Stock |
+----+-------------+--------+
| 1 | Apple | 14 |
| 2 | Banana | 88,041 |
| 3 | Cherry | 342 |
| 4 | Dragonfruit | 1 |
+----+-------------+--------+
| | Count | 4 |
+----+-------------+--------+
Metadata
Metadata
Assignees
Labels
No labels