MCPcopy Index your code
hub / github.com/git-bug/git-bug / renderHeader

Method renderHeader

termui/bug_table.go:349–360  ·  view source on GitHub ↗
(v *gocui.View, maxX int)

Source from the content-addressed store, hash-verified

347}
348
349func (bt *bugTable) renderHeader(v *gocui.View, maxX int) {
350 columnWidths := bt.getColumnWidths(maxX)
351
352 id := text.LeftPadMaxLine("ID", columnWidths["id"], 0)
353 status := text.LeftPadMaxLine("STATUS", columnWidths["status"], 0)
354 title := text.LeftPadMaxLine("TITLE", columnWidths["title"], 0)
355 author := text.LeftPadMaxLine("AUTHOR", columnWidths["author"], 0)
356 comments := text.LeftPadMaxLine("CMT", columnWidths["comments"], 0)
357 lastEdit := text.LeftPadMaxLine("LAST EDIT", columnWidths["lastEdit"], 1)
358
359 _, _ = fmt.Fprintf(v, "%s %s %s %s %s %s\n", id, status, title, author, comments, lastEdit)
360}
361
362func (bt *bugTable) renderFooter(v *gocui.View, maxX int) {
363 _, _ = fmt.Fprintf(v, " \nShowing %d of %d bugs", len(bt.excerpts), len(bt.allIds))

Callers 1

layoutMethod · 0.95

Calls 1

getColumnWidthsMethod · 0.95

Tested by

no test coverage detected