Files
obitools4/pkg/obidefault/progressbar.go
Eric Coissac 1a28d5ed64 Add progress bar configuration and conditional display
This commit introduces a new configuration module `obidefault` to manage progress bar settings, allowing users to disable progress bars via a `--no-progressbar` option. It updates various packages to conditionally display progress bars based on this new configuration, improving user experience by providing control over progress bar output. The changes also include improvements to progress bar handling in several packages, ensuring they are only displayed when appropriate (e.g., when stderr is a terminal and stdout is not piped).
2026-02-08 16:14:02 +01:00

20 lines
293 B
Go

package obidefault
var __no_progress_bar__ = false
func ProgressBar() bool {
return !__no_progress_bar__
}
func NoProgressBar() bool {
return __no_progress_bar__
}
func SetNoProgressBar(b bool) {
__no_progress_bar__ = b
}
func NoProgressBarPtr() *bool {
return &__no_progress_bar__
}