(keys []string)
| 51 | const indent = 2 |
| 52 | |
| 53 | func (t *Table) SetHeader(keys []string) { |
| 54 | t.colSize = len(keys) + indent |
| 55 | for i, v := range keys { |
| 56 | t.parseDimension(v, i) |
| 57 | } |
| 58 | t.headers = append(t.headers, keys...) |
| 59 | } |
| 60 | |
| 61 | func (t *Table) parseDimension(str string, colKey int) { |
| 62 | maxWidth := 0 |