Skip to content

Commit a9415f4

Browse files
committed
lint
1 parent dfd640d commit a9415f4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

progress.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func (p *Progress) Percent() (perc float64) {
4848
// @reset - If set true, a `\r` is printed before each line, which will reset it on most terminals.
4949
// @exit - If exit is true, then the for loop exit and the process returns when Progress.Done is true.
5050
// Set `exit` true if you want a separate printer for each archive. A good reason is parallel extractions.
51-
func ArchiveProgress(every float64, progress chan Progress, reset, exit bool) {
51+
func ArchiveProgress(every float64, progress chan Progress, reset, exit bool) { //nolint:cyclop
5252
var (
5353
perc, last float64
5454
pre string
@@ -80,11 +80,13 @@ func ArchiveProgress(every float64, progress chan Progress, reset, exit bool) {
8080

8181
if perc = prog.Percent(); perc == maxPercent && last < maxPercent {
8282
last = maxPercent
83+
8384
fmt.Printf(mod, pre, perc)
8485
}
8586

8687
if last == 0 && perc == 0 || perc > last+every {
8788
last = perc + extra // we add extra so 0% only prints once.
89+
8890
fmt.Printf(mod, pre, perc)
8991
}
9092
}

0 commit comments

Comments
 (0)