Documentation
¶
Overview ¶
Package processor provides functionality for managing tool installations and updates. It handles concurrent processing of tools, caching of tool versions, and progress tracking during downloads. The package coordinates the entire lifecycle of tool installation from configuration to execution.
Package processor handles the processing of tool installations and management.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrorColors = text.Colors{text.FgRed} InfoColors = text.Colors{text.FgYellow} SuccessColors = text.Colors{text.FgGreen} WarningColors = text.Colors{text.FgHiYellow} DefaultColors = text.Colors{text.BgBlack} )
Common color providers for different result states.
var ErrToolsFailedToInstall = errors.New("tools failed to install")
ErrToolsFailedToInstall is returned when one or more tools failed to install.
Functions ¶
This section is empty.
Types ¶
type HeaderConfig ¶
type HeaderConfig struct {
// Name is the header column name.
Name any
// WidthMax is the maximum width for the column.
WidthMax int
// Bold indicates if the header should be displayed in bold.
Bold bool
}
HeaderConfig defines the configuration for a table header column.
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor handles tool installation and management.
func (*Processor) Process ¶
func (p *Processor) Process(tags tags.IncludeTags, dry bool) error
Process installs and manages tools with the given tags.
func (*Processor) UpdateCache ¶
UpdateCache attempts to update the cache with tool version information.
type ResultTable ¶
type ResultTable struct {
// contains filtered or unexported fields
}
ResultTable encapsulates the table creation and rendering logic for displaying tool processing results.
func NewResultTable ¶
func NewResultTable(headers ...HeaderConfig) *ResultTable
NewResultTable creates a new result table with properly configured styling.
func (*ResultTable) AddResult ¶
AddResult adds a single result to the table with specified coloring.
func (*ResultTable) Clear ¶
func (rt *ResultTable) Clear()
Clear removes all rows from the table (except the header).
func (*ResultTable) Render ¶
func (rt *ResultTable) Render() string
Render returns the rendered table as a string.