MCPcopy Create free account
hub / github.com/basecamp/hey-cli / print

Method print

internal/cmd/formatting.go:43–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41 }
42}
43
44// addRow adds a row, sanitizing every cell on the way in: a table is where server
45// data lands most often, and a cell is one line by construction.
46func (t *table) addRow(row []string) {
47 cells := make([]string, len(row))
48 for i, cell := range row {
49 cells[i] = terminal.SanitizeLine(cell)
50 }
51 t.updateColumnWidths(cells)
52 t.rows = append(t.rows, cells)
53}
54
55func (t *table) print() {
56 for rownum, row := range t.rows {
57 for i, cell := range row {
58 cellStyle := plain
59 if rownum == 0 {
60 cellStyle = italic
61 }
62 if rownum > 0 && i == 0 {

Callers 10

runMethod · 0.80
newCommandsCommandFunction · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
newConfigShowCommandFunction · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80

Calls 1

formatMethod · 0.80

Tested by

no test coverage detected