mirror of
https://github.com/gravitational/teleport
synced 2024-10-20 17:23:22 +00:00
PR Buddy 16673 - fix(asciitable): Default maxCellLength to 0 if negative (#17777)
* fix(asciitable): Default maxCellLength to 0 if negative * Run Goimports on modified file Co-authored-by: Håkon Solbjørg <hakon@solbj.org>
This commit is contained in:
parent
034ac9062a
commit
39f4bc3c77
|
@ -107,7 +107,7 @@ func MakeTableWithTruncatedColumn(columnOrder []string, rows [][]string, truncat
|
|||
|
||||
for _, column := range columns {
|
||||
if column.Title == truncatedColumn {
|
||||
column.MaxCellLength = width - totalLen - len("... ")
|
||||
column.MaxCellLength = max(width-totalLen-len("... "), 0)
|
||||
}
|
||||
t.AddColumn(column)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue