Documentation
¶
Index ¶
- type TablePrinter
- func (t *TablePrinter) AddColorField(text, state string)
- func (t *TablePrinter) AddField(text string, colorFunc ...func(string) string)
- func (t *TablePrinter) AddHeader(columns ...string)
- func (t *TablePrinter) AddIDField(id string, state string)
- func (t *TablePrinter) AddProjectField(name, state string)
- func (t *TablePrinter) AddStatusField(completed bool)
- func (t *TablePrinter) AddTimeField(now, timestamp time.Time)
- func (t *TablePrinter) AddTodoField(title string, completed bool)
- func (t *TablePrinter) EndRow()
- func (t *TablePrinter) GetColorScheme() *tableprinter.ColorScheme
- func (t *TablePrinter) IsTTY() bool
- func (t *TablePrinter) Render() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TablePrinter ¶
type TablePrinter struct {
// contains filtered or unexported fields
}
TablePrinter provides bc4-specific table functionality wrapping the core tableprinter
func New ¶
func New(writer io.Writer) *TablePrinter
New creates a new bc4 table printer with automatic TTY detection
func NewWithOptions ¶
func NewWithOptions(writer io.Writer, isTTY bool, maxWidth int) *TablePrinter
NewWithOptions creates a table printer with specific options
func (*TablePrinter) AddColorField ¶
func (t *TablePrinter) AddColorField(text, state string)
AddColorField adds a field with color based on state
func (*TablePrinter) AddField ¶
func (t *TablePrinter) AddField(text string, colorFunc ...func(string) string)
AddField adds a field to the current row
func (*TablePrinter) AddHeader ¶
func (t *TablePrinter) AddHeader(columns ...string)
AddHeader adds headers to the table, following GitHub CLI's pattern
func (*TablePrinter) AddIDField ¶
func (t *TablePrinter) AddIDField(id string, state string)
AddIDField adds an ID field with appropriate formatting
func (*TablePrinter) AddProjectField ¶
func (t *TablePrinter) AddProjectField(name, state string)
AddProjectField adds a project name field
func (*TablePrinter) AddStatusField ¶
func (t *TablePrinter) AddStatusField(completed bool)
AddStatusField adds a status symbol field (like GitHub CLI's check marks)
func (*TablePrinter) AddTimeField ¶
func (t *TablePrinter) AddTimeField(now, timestamp time.Time)
AddTimeField adds a time field with GitHub CLI-style formatting
func (*TablePrinter) AddTodoField ¶
func (t *TablePrinter) AddTodoField(title string, completed bool)
AddTodoField adds a todo item field with status indication
func (*TablePrinter) GetColorScheme ¶
func (t *TablePrinter) GetColorScheme() *tableprinter.ColorScheme
GetColorScheme returns the color scheme for direct access
func (*TablePrinter) IsTTY ¶
func (t *TablePrinter) IsTTY() bool
IsTTY returns whether the output is a terminal
func (*TablePrinter) Render ¶
func (t *TablePrinter) Render() error
Render outputs the complete table