summaryrefslogtreecommitdiff
path: root/lib/textui/progress.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-01-01 22:43:58 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-01-01 22:43:58 -0700
commitd675f41242c043ddc4c6c1a1fb8aabcfd324aae2 (patch)
tree4f2afbce761eb377ad0b0ab2e4fb2f478ff844f5 /lib/textui/progress.go
parent9971e38110d5f90d15c7b78f396f2638b3952a96 (diff)
parent6e1a9fbb1e9a943e04902ed3a4958f6821e39456 (diff)
Merge branch 'lukeshu/lint'
Diffstat (limited to 'lib/textui/progress.go')
-rw-r--r--lib/textui/progress.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/textui/progress.go b/lib/textui/progress.go
index 7b3f63a..68d986f 100644
--- a/lib/textui/progress.go
+++ b/lib/textui/progress.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2022 Luke Shumaker <lukeshu@lukeshu.com>
+// Copyright (C) 2022-2023 Luke Shumaker <lukeshu@lukeshu.com>
//
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -19,7 +19,7 @@ type Stats interface {
}
type Progress[T Stats] struct {
- ctx context.Context
+ ctx context.Context //nolint:containedctx // captured for separate goroutine
lvl dlog.LogLevel
interval time.Duration
@@ -56,6 +56,7 @@ func (p *Progress[T]) Done() {
}
func (p *Progress[T]) flush(force bool) {
+ //nolint:forcetypeassert // It wasn't worth it to me (yet?) to make a typed wrapper around atomic.Value.
cur := p.cur.Load().(T)
if !force && cur == p.oldStat {
return