jedib0t / go-pretty

Table-writer and more in golang!
MIT License
3.06k stars 120 forks source link

Allow removal of trackers and clearing of progress #321

Closed apprehensions closed 1 month ago

apprehensions commented 6 months ago

Is your feature request related to a problem? Please describe. Progress bars remain, even after completing. The same can be said for Progress when all Trackers has been satisfied.

Describe the solution you'd like func (p *Progress) Clear() to clear all trackers. func (t *Tracker) Remove() to remove the tracker from Progress

jedib0t commented 6 months ago

Hey @apprehensions can you share code or video of what you mean by the progress bars remains after completion?

apprehensions commented 6 months ago

https://raw.githubusercontent.com/jedib0t/go-pretty/main/progress/images/demo.gif

I'm thus video you made, after the trackers finish with done!, they remain there. I would like for them to be removed from the terminal instead.

jedib0t commented 1 month ago

Hey @apprehensions ... I know this is 5 months late, but I've implemented a "RemoveOnCompletion" option on the trackers. Check it out. It is on the main branch. If it works for you I can cut a new tag for you.