package bar import ( "os" "github.com/schollz/progressbar/v3" ) // Return a new ProgressBar func New(tasks int) *progressbar.ProgressBar { return progressbar.NewOptions(tasks, progressbar.OptionSetWriter(os.Stderr), progressbar.OptionShowCount(), progressbar.OptionShowIts(), progressbar.OptionSetPredictTime(false), progressbar.OptionClearOnFinish(), progressbar.OptionEnableColorCodes(true), progressbar.OptionSetWidth(40), progressbar.OptionSetTheme(progressbar.Theme{ Saucer: "[blue]=[reset]", SaucerHead: "[blue]>[reset]", SaucerPadding: " ", BarStart: "[", BarEnd: "]", }), ) }