MCPcopy Create free account
hub / github.com/compozy/agh / humanTableColumnWidths

Function humanTableColumnWidths

internal/cli/format.go:260–271  ·  view source on GitHub ↗
(rows [][]string)

Source from the content-addressed store, hash-verified

258}
259
260func humanTableColumnWidths(rows [][]string) []int {
261 var widths []int
262 for _, row := range rows {
263 for column, cell := range row {
264 if column == len(widths) {
265 widths = append(widths, 0)
266 }
267 widths[column] = max(widths[column], humanTableCellWidth(cell))
268 }
269 }
270 return widths
271}
272
273func writeHumanTableRow(builder *strings.Builder, row []string, widths []int) {
274 for column, cell := range row {

Callers 1

renderHumanTableFunction · 0.85

Calls 2

appendFunction · 0.85
humanTableCellWidthFunction · 0.85

Tested by

no test coverage detected