Take into account ':<type>' when computing column header widths

pull/10616/head
Christopher Wolff 2018-08-07 11:12:38 -07:00
parent a647f10c14
commit d7f64171cb
1 changed files with 2 additions and 1 deletions

View File

@ -87,7 +87,8 @@ func (f *Formatter) WriteTo(out io.Writer) (int64, error) {
// Compute header widths
f.widths = make([]int, len(cols))
for j, c := range cols {
l := len(c.Label)
// Column header is "<label>:<type>"
l := len(c.Label) + len(c.Type.String()) + 1
min := minWidthsByType[c.Type]
if min > l {
l = min