Documentation
¶
Index ¶
- func FormatStatusLabel(action string) string
- func FormatSummaryLine(total, cloned, updated, dirty, branchDrift, unknown, excluded, errors int) string
- func IsTerminalOutput() bool
- func ShouldColor() bool
- type DirtyFileInfo
- type Printer
- func (p *Printer) AdvanceRepoProgress()
- func (p *Printer) AuthError(err error)
- func (p *Printer) Collision(name, detail string)
- func (p *Printer) ConfigError(err error)
- func (p *Printer) ExcludedButPresent(name string)
- func (p *Printer) FinishRepoProgress()
- func (p *Printer) Header(text string)
- func (p *Printer) MissingDotfile(filename string)
- func (p *Printer) RepoBranchDrift(name, fromBranch, toBranch string, updated bool)
- func (p *Printer) RepoCloned(name string)
- func (p *Printer) RepoDirty(name, currentBranch, defaultBranch string, files []DirtyFileInfo, ...)
- func (p *Printer) RepoError(name, action string, err error)
- func (p *Printer) RepoUpdated(name string)
- func (p *Printer) StartRepoProgress(total int)
- func (p *Printer) Summary(total, cloned, updated, dirty, branchDrift, unknown, excluded, errors int)
- func (p *Printer) SystemError(context string, err error)
- func (p *Printer) UnknownFolder(name string)
- func (p *Printer) Verbose(format string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatStatusLabel ¶
FormatStatusLabel returns the text label for a repo action.
func FormatSummaryLine ¶
func FormatSummaryLine(total, cloned, updated, dirty, branchDrift, unknown, excluded, errors int) string
FormatSummaryLine builds a plain-text summary line (for testing).
func IsTerminalOutput ¶
func IsTerminalOutput() bool
IsTerminalOutput returns true when stdout is a terminal.
Types ¶
type DirtyFileInfo ¶
DirtyFileInfo is a simple struct for passing to Printer.
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
Printer handles formatted output with optional color support.
func NewPrinter ¶
NewPrinter creates a new Printer. color: whether to enable ANSI color output verbose: whether to show verbose output
func (*Printer) AdvanceRepoProgress ¶
func (p *Printer) AdvanceRepoProgress()
AdvanceRepoProgress increments the repository progress bar by one.
func (*Printer) ConfigError ¶
ConfigError prints a configuration error message.
func (*Printer) ExcludedButPresent ¶
ExcludedButPresent prints an excluded-but-present finding.
func (*Printer) FinishRepoProgress ¶
func (p *Printer) FinishRepoProgress()
FinishRepoProgress renders the completed progress line and moves to the next line.
func (*Printer) MissingDotfile ¶
MissingDotfile prints the message when .ghorgsync is not found.
func (*Printer) RepoBranchDrift ¶
RepoBranchDrift prints a branch drift finding with checkout action.
func (*Printer) RepoCloned ¶
RepoCloned prints a clone action.
func (*Printer) RepoDirty ¶
func (p *Printer) RepoDirty(name, currentBranch, defaultBranch string, files []DirtyFileInfo, additions, deletions int)
RepoDirty prints a dirty repo finding.
func (*Printer) RepoUpdated ¶
RepoUpdated prints an update action.
func (*Printer) StartRepoProgress ¶
StartRepoProgress starts a live progress line for repository processing.
func (*Printer) Summary ¶
func (p *Printer) Summary(total, cloned, updated, dirty, branchDrift, unknown, excluded, errors int)
Summary prints the final summary block.
func (*Printer) SystemError ¶
SystemError prints a system-level error.
func (*Printer) UnknownFolder ¶
UnknownFolder prints an unknown folder finding.