diff --git a/progressbar_printer.go b/progressbar_printer.go index 02dea5848..2fb3f9105 100644 --- a/progressbar_printer.go +++ b/progressbar_printer.go @@ -257,11 +257,14 @@ func (p *ProgressbarPrinter) Add(count int) *ProgressbarPrinter { } // Start the ProgressbarPrinter. -func (p ProgressbarPrinter) Start() (*ProgressbarPrinter, error) { +func (p ProgressbarPrinter) Start(title ...interface{}) (*ProgressbarPrinter, error) { if RawOutput && p.ShowTitle { Fprintln(p.Writer, p.Title) } p.IsActive = true + if len(title) != 0 { + p.Title = Sprint(title...) + } ActiveProgressBarPrinters = append(ActiveProgressBarPrinters, &p) p.startedAt = time.Now()