MCPcopy Create free account
hub / github.com/deepflowio/deepflow / parseDimension

Method parseDimension

cli/ctl/common/table/table.go:61–73  ·  view source on GitHub ↗
(str string, colKey int)

Source from the content-addressed store, hash-verified

59}
60
61func (t *Table) parseDimension(str string, colKey int) {
62 maxWidth := 0
63 w := displayWidth(str) + indent
64 if w > maxWidth {
65 maxWidth = w
66 }
67
68 // Store the new known maximum width.
69 v, ok := t.maxWidth[colKey]
70 if !ok || v < maxWidth || v == 0 {
71 t.maxWidth[colKey] = maxWidth
72 }
73}
74
75// AppendBulk uses for Bulk Append
76func (t *Table) AppendBulk(rows [][]string) {

Callers 2

SetHeaderMethod · 0.95
AppendMethod · 0.95

Calls 1

displayWidthFunction · 0.85

Tested by

no test coverage detected