DisplayTableWithHeader outputs a simple non-wrapping table with bolded headers.
(prefix string, table [][]string, padding int)
| 81 | // DisplayTableWithHeader outputs a simple non-wrapping table with bolded |
| 82 | // headers. |
| 83 | func (ui *UI) DisplayTableWithHeader(prefix string, table [][]string, padding int) { |
| 84 | if len(table) == 0 { |
| 85 | return |
| 86 | } |
| 87 | for i, str := range table[0] { |
| 88 | table[0][i] = ui.modifyColor(str, color.New(color.Bold)) |
| 89 | } |
| 90 | |
| 91 | ui.DisplayNonWrappingTable(prefix, table, padding) |
| 92 | } |
| 93 | |
| 94 | func wordSize(str string) int { |
| 95 | cleanStr := vtclean.Clean(str, false) |
no test coverage detected