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) RepoStatusBranchDrift(name, currentBranch, defaultBranch string)
- func (p *Printer) RepoStatusDirty(name, currentBranch, defaultBranch, statusOutput string)
- func (p *Printer) RepoUpdated(name string)
- func (p *Printer) StartRepoProgress(total int)
- func (p *Printer) StatusSummary(total, dirty, branchDrift 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) Trace(format string, args ...any)
- func (p *Printer) UnknownFolder(name string)
- func (p *Printer) Verbose(format string, args ...any)
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 verbosity: 0=quiet, 1=verbose, 2=trace noProgress: when true, suppress the live progress bar even on a TTY
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) RepoStatusBranchDrift ¶ added in v0.2.0
RepoStatusBranchDrift prints a non-default branch finding in status mode.
func (*Printer) RepoStatusDirty ¶ added in v0.2.0
RepoStatusDirty prints a dirty repo in status mode with colorized git status output.
func (*Printer) RepoUpdated ¶
RepoUpdated prints an update action.
func (*Printer) StartRepoProgress ¶
StartRepoProgress starts a live progress line for repository processing.
func (*Printer) StatusSummary ¶ added in v0.2.0
StatusSummary prints the summary line for status mode.
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) Trace ¶ added in v0.3.3
Trace prints a message only in trace mode (verbosity >= 2). Multi-line messages are indented line-by-line.
func (*Printer) UnknownFolder ¶
UnknownFolder prints an unknown folder finding.