Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Red = color.New(color.FgRed).SprintFunc() Yellow = color.New(color.FgYellow).SprintFunc() Green = color.New(color.FgGreen).SprintFunc() Blue = color.New(color.FgBlue).SprintFunc() Dim = color.New(color.Faint).SprintFunc() Bold = color.New(color.Bold).SprintFunc() )
Color helpers
Functions ¶
func ParseSince ¶
ParseSince converts "24h", "7d", "2w" to hours.
func RelativeTime ¶
RelativeTime returns a human-readable relative time.
func StatusColor ¶
StatusColor returns colored status string.
Types ¶
type TableWriter ¶
type TableWriter struct {
// contains filtered or unexported fields
}
TableWriter wraps tablewriter.Table with a simpler API.
func Table ¶
func Table(headers []string) *TableWriter
Table creates a new table writer with headers.
func (*TableWriter) Append ¶
func (t *TableWriter) Append(row []string)
Append adds a row to the table.
Click to show internal directories.
Click to hide internal directories.