mirror of
https://github.com/ivuorinen/gh-action-readme.git
synced 2026-02-21 00:51:56 +00:00
feat: add interactive wizard, contextual errors, and code improvements
- Add interactive configuration wizard with auto-detection and multi-format export - Implement contextual error system with 14 error codes and actionable suggestions - Add centralized progress indicators with consistent theming - Fix all cyclomatic complexity issues (8 functions refactored) - Eliminate code duplication with centralized utilities and error handling - Add comprehensive test coverage for all new components - Update TODO.md with completed tasks and accurate completion dates
This commit is contained in:
@@ -359,25 +359,14 @@ func (g *Generator) ValidateFiles(paths []string) error {
|
||||
|
||||
// createProgressBar creates a progress bar with the specified description.
|
||||
func (g *Generator) createProgressBar(description string, paths []string) *progressbar.ProgressBar {
|
||||
if len(paths) <= 1 || g.Config.Quiet {
|
||||
return nil
|
||||
}
|
||||
return progressbar.NewOptions(len(paths),
|
||||
progressbar.OptionSetDescription(description),
|
||||
progressbar.OptionSetWidth(50),
|
||||
progressbar.OptionShowCount(),
|
||||
progressbar.OptionShowIts(),
|
||||
progressbar.OptionSetTheme(progressbar.Theme{
|
||||
Saucer: "=",
|
||||
SaucerHead: ">",
|
||||
SaucerPadding: " ",
|
||||
BarStart: "[",
|
||||
BarEnd: "]",
|
||||
}))
|
||||
progressMgr := NewProgressBarManager(g.Config.Quiet)
|
||||
return progressMgr.CreateProgressBarForFiles(description, paths)
|
||||
}
|
||||
|
||||
// finishProgressBar completes the progress bar display.
|
||||
func (g *Generator) finishProgressBar(bar *progressbar.ProgressBar) {
|
||||
progressMgr := NewProgressBarManager(g.Config.Quiet)
|
||||
progressMgr.FinishProgressBar(bar)
|
||||
if bar != nil {
|
||||
fmt.Println()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user