Skip to content

Commit 1090234

Browse files
committed
Hide the progress using pb.Static
This way the pb.Start() does not start the ticker and never write anything: https://github.com/cheggaaa/pb/blob/master/v3/pb.go#L173 Signed-off-by: Nir Soffer <[email protected]>
1 parent 2dcd64a commit 1090234

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/downloader/downloader.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ var HideProgress bool
2929

3030
// hideBar is used only for testing.
3131
func hideBar(bar *pb.ProgressBar) {
32-
bar.Set(pb.ReturnSymbol, "")
33-
bar.SetTemplateString("")
32+
bar.Set(pb.Static, true)
3433
}
3534

3635
type Status = string

0 commit comments

Comments
 (0)