Skip to content

Description not updated after progress bar completion #224

@tympanix

Description

@tympanix

The description can't be updated after the progress bar has reached 100%. Consider this example:

package main

import (
	"time"

	"github.com/schollz/progressbar/v3"
)

func main() {
	bar := progressbar.NewOptions(100,
		progressbar.OptionSetDescription("Uploading files"),
		progressbar.OptionShowCount(),
	)
	for i := 0; i < 100; i++ {
		bar.Add(1)
		time.Sleep(10 * time.Millisecond)
	}

	bar.Describe("Upload complete")
}

Actual output

Uploading files 100% |████████████████████████████████████████| (100/100)

Expected output

Upload complete 100% |███████████████████████████████████████| (100/100)

See: https://github.com/schollz/progressbar/blob/main/progressbar.go#L959

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions