We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
go func() { ctx := context.Background() progressChan := progress.NewTicker(ctx, r, size, 1*time.Second) for p := range progressChan { fmt.Printf("\r%v remaining...", p.Remaining().Round(time.Second)) } fmt.Println("\rdownload is completed") }()
I guess the line ctx := context.Background() should be deleted since ctx is already defined outer goroutine.
ctx := context.Background()
The text was updated successfully, but these errors were encountered:
Also need fix string
progressChan := progress.NewTicker(ctx, r, size, 1*time.Second)
Must be
progressChan := progress.NewTicker(ctx, r, int64(size), 1*time.Second)
Sorry, something went wrong.
No branches or pull requests
I guess the line
ctx := context.Background()
should be deleted since ctx is already defined outer goroutine.The text was updated successfully, but these errors were encountered: