gofunc() {
ctx:=context.Background()
progressChan:=progress.NewTicker(ctx, r, size, 1*time.Second)
forp:=rangeprogressChan {
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.
I guess the line
ctx := context.Background()should be deleted since ctx is already defined outer goroutine.