Closed nektro closed 4 years ago
Decorators like percentage and eta for example are meant to be fixed format.
Do you want to have something like decor.Name
but with ability to set any text while bar is rendering?
As for decor.CBFunc
I don't see any reason why it should provide index.
sparing the bad function name, I have this to generate a bar and the request was so that I could something like the following and update the last decorator
if you're wondering "why create a Bar with a total of 1" it's because I have other methods with a similar utility
I did some refactoring. You can use Any decorator in order to update decorator's text when needed.
Also, refer to pattern used in on_complete.go. You can override any existing decorator by using that pattern.
Right now there is no way to update the bar title or any decorator text, only change their configs.
Additionally,
decor.CBFunc
takes no index, so you have no idea which decorating with Bar.TraverseDecorators.