Documentation ¶
Overview ¶
Package console contains code to pretty-print different types to the console.
Index ¶
- func FormatDuration(d time.Duration) string
- func PrintCalendarMonth(month time.Time, cal *personio.AttendanceCalendar)
- func UsageTemplate() string
- type Table
- func (t *Table) CommitRow()
- func (t *Table) Fprintln(w io.Writer)
- func (t *Table) Println()
- func (t *Table) Rows() int
- func (t *Table) SetPrefix(prefix string)
- func (t *Table) SetSpacing(spacing string)
- func (t *Table) WidestCellWidth() int
- func (t *Table) Width() int
- func (t *Table) WriteCell(s string)
- func (t *Table) WriteCellColor(s string, c *color.Color)
- func (t *Table) WriteCellWidth(s string, width int)
- func (t *Table) WriteColoredRow(c *color.Color, headers ...string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatDuration ¶
FormatDuration returns a formatted time.Duration in the format of h:mm.
func PrintCalendarMonth ¶
func PrintCalendarMonth(month time.Time, cal *personio.AttendanceCalendar)
func UsageTemplate ¶
func UsageTemplate() string
UsageTemplate returns a lightly colored usage template for Cobra.
Types ¶
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
func (*Table) SetSpacing ¶
func (*Table) WidestCellWidth ¶
func (*Table) WriteCellWidth ¶
Click to show internal directories.
Click to hide internal directories.