MCPcopy Index your code
hub / github.com/cloudfoundry/cli / DisplayTableWithHeader

Method DisplayTableWithHeader

util/ui/table.go:83–92  ·  view source on GitHub ↗

DisplayTableWithHeader outputs a simple non-wrapping table with bolded headers.

(prefix string, table [][]string, padding int)

Source from the content-addressed store, hash-verified

81// DisplayTableWithHeader outputs a simple non-wrapping table with bolded
82// headers.
83func (ui *UI) DisplayTableWithHeader(prefix string, table [][]string, padding int) {
84 if len(table) == 0 {
85 return
86 }
87 for i, str := range table[0] {
88 table[0][i] = ui.modifyColor(str, color.New(color.Bold))
89 }
90
91 ui.DisplayNonWrappingTable(prefix, table, padding)
92}
93
94func wordSize(str string) int {
95 cleanStr := vtclean.Clean(str, false)

Callers 1

Calls 2

modifyColorMethod · 0.95

Tested by

no test coverage detected