Documentation
¶
Index ¶
- func GetTerminalWidth() int
- func IsTTY(w io.Writer) bool
- func WithColor(colorFunc func(string) string) fieldOption
- func WithPadding(paddingFunc func(int, string) string) fieldOption
- func WithTruncate(truncateFunc func(int, string) string) fieldOption
- type ColorScheme
- func (cs *ColorScheme) AccountName(s string) string
- func (cs *ColorScheme) ColorFromString(state string) func(string) string
- func (cs *ColorScheme) Description(s string) string
- func (cs *ColorScheme) ID(s string) string
- func (cs *ColorScheme) ProjectActive(s string) string
- func (cs *ColorScheme) ProjectArchived(s string) string
- func (cs *ColorScheme) Timestamp(s string) string
- func (cs *ColorScheme) TodoCompleted(s string) string
- func (cs *ColorScheme) TodoIncomplete(s string) string
- func (cs *ColorScheme) TodoListName(s string) string
- type TablePrinter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTerminalWidth ¶
func GetTerminalWidth() int
GetTerminalWidth returns the terminal width with fallback
func WithPadding ¶
WithPadding applies a custom padding function to a field
func WithTruncate ¶
WithTruncate applies a custom truncation function to a field
Types ¶
type ColorScheme ¶
type ColorScheme struct {
// State colors for different entity states
Green func(string) string // Active/Open items
Red func(string) string // Completed/Closed items
Magenta func(string) string // Special/Merged items
Gray func(string) string // Draft/Inactive items
Cyan func(string) string // Names/Identifiers
Yellow func(string) string // Private/Warning items
Muted func(string) string // Secondary info/timestamps
Bold func(string) string // Emphasis
}
ColorScheme provides state-based color functions following GitHub CLI's design
func NewColorScheme ¶
func NewColorScheme() *ColorScheme
NewColorScheme creates a new color scheme with TTY detection
func (*ColorScheme) AccountName ¶
func (cs *ColorScheme) AccountName(s string) string
func (*ColorScheme) ColorFromString ¶
func (cs *ColorScheme) ColorFromString(state string) func(string) string
ColorFromString returns a color function based on a state string This matches GitHub CLI's pattern for dynamic color selection
func (*ColorScheme) Description ¶
func (cs *ColorScheme) Description(s string) string
func (*ColorScheme) ID ¶
func (cs *ColorScheme) ID(s string) string
func (*ColorScheme) ProjectActive ¶
func (cs *ColorScheme) ProjectActive(s string) string
Predefined color functions for common Basecamp entity states
func (*ColorScheme) ProjectArchived ¶
func (cs *ColorScheme) ProjectArchived(s string) string
func (*ColorScheme) Timestamp ¶
func (cs *ColorScheme) Timestamp(s string) string
func (*ColorScheme) TodoCompleted ¶
func (cs *ColorScheme) TodoCompleted(s string) string
func (*ColorScheme) TodoIncomplete ¶
func (cs *ColorScheme) TodoIncomplete(s string) string
func (*ColorScheme) TodoListName ¶
func (cs *ColorScheme) TodoListName(s string) string
type TablePrinter ¶
type TablePrinter interface {
AddHeader([]string, ...fieldOption)
AddField(string, ...fieldOption)
EndRow()
Render() error
}
TablePrinter provides the interface for table rendering, matching GitHub CLI's design
Click to show internal directories.
Click to hide internal directories.