ui/progress: unexport NoopPrinter and add New* function

This commit is contained in:
Michael Eischer
2026-06-05 14:48:44 +02:00
parent e8ed2434cd
commit 0bbfb072af
13 changed files with 41 additions and 35 deletions
+2 -2
View File
@@ -37,7 +37,7 @@ type mockPrinter struct {
trace printerTrace
items itemTrace
errors errorTrace
progress.NoopPrinter
progress.Printer
}
const mockFinishDuration = 42 * time.Second
@@ -57,7 +57,7 @@ func (p *mockPrinter) Finish(progress State, _ time.Duration) {
}
func testProgress(fn func(progress *Progress) bool) (printerTrace, itemTrace, errorTrace) {
printer := &mockPrinter{}
printer := &mockPrinter{Printer: progress.NewNoopPrinter()}
progress := NewProgress(printer, 0)
final := fn(progress)
progress.update(0, final)