Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix progress #66

Merged
merged 1 commit into from
Mar 11, 2021
Merged

bugfix progress #66

merged 1 commit into from
Mar 11, 2021

Conversation

huangnauh
Copy link
Contributor

fix panic when total = 0

panic: runtime error: index out of range [0] with length 0

goroutine 6 [running]:
github.com/gosuri/uiprogress.(*Bar).Bytes(0xc0002acc00, 0xc00007c1e0, 0xc00030ed20, 0xc000284f78)
        /disk/ssd1/go/pkg/mod/github.com/gosuri/[email protected]/bar.go:195 +0x525
github.com/gosuri/uiprogress.(*Bar).String(...)
        /disk/ssd1/go/pkg/mod/github.com/gosuri/[email protected]/bar.go:214
github.com/gosuri/uiprogress.(*Progress).print(0xc000070780)
        /disk/ssd1/go/pkg/mod/github.com/gosuri/[email protected]/progress.go:127 +0x9e
github.com/gosuri/uiprogress.(*Progress).Listen(0xc000070780)
        /disk/ssd1/go/pkg/mod/github.com/gosuri/[email protected]/progress.go:114 +0x45
created by github.com/gosuri/uiprogress.(*Progress).Start
        /disk/ssd1/go/pkg/mod/github.com/gosuri/[email protected]/progress.go:134 +0x3f

@huangnauh huangnauh requested a review from chzhuo March 11, 2021 02:34
@chzhuo
Copy link

chzhuo commented Mar 11, 2021

LGTM

@huangnauh huangnauh merged commit 78ea6f8 into upyun:master Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants