summaryrefslogtreecommitdiff
path: root/lib/textui
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-01-26 14:53:37 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-01-30 22:15:06 -0700
commit86063b41fc1a235930d6c79e6b7cd38ae8d8c147 (patch)
tree5c6b523a1c24062bbaba60bca1b7042b9976701c /lib/textui
parentf4f062d7d4ed730411e04ecd36ee36387e50739c (diff)
Split lib/containers.Sync* to git.lukeshu.com/go/typedsync
Diffstat (limited to 'lib/textui')
-rw-r--r--lib/textui/log.go5
-rw-r--r--lib/textui/progress.go5
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/textui/log.go b/lib/textui/log.go
index 605755d..2bcd9af 100644
--- a/lib/textui/log.go
+++ b/lib/textui/log.go
@@ -23,10 +23,9 @@ import (
"time"
"unicode"
+ "git.lukeshu.com/go/typedsync"
"github.com/datawire/dlib/dlog"
"github.com/spf13/pflag"
-
- "git.lukeshu.com/btrfs-progs-ng/lib/containers"
)
type LogLevelFlag struct {
@@ -154,7 +153,7 @@ func (l *logger) UnformattedLogf(lvl dlog.LogLevel, format string, args ...any)
}
var (
- logBufPool = containers.SyncPool[*bytes.Buffer]{
+ logBufPool = typedsync.Pool[*bytes.Buffer]{
New: func() *bytes.Buffer {
return new(bytes.Buffer)
},
diff --git a/lib/textui/progress.go b/lib/textui/progress.go
index 1a5e7d8..48a3901 100644
--- a/lib/textui/progress.go
+++ b/lib/textui/progress.go
@@ -9,9 +9,8 @@ import (
"fmt"
"time"
+ "git.lukeshu.com/go/typedsync"
"github.com/datawire/dlib/dlog"
-
- "git.lukeshu.com/btrfs-progs-ng/lib/containers"
)
type Stats interface {
@@ -27,7 +26,7 @@ type Progress[T Stats] struct {
cancel context.CancelFunc
done chan struct{}
- cur containers.SyncValue[T]
+ cur typedsync.Value[T]
oldStat T
oldLine string
}