diff options
Diffstat (limited to 'lib/textui')
-rw-r--r-- | lib/textui/log.go | 5 | ||||
-rw-r--r-- | lib/textui/progress.go | 5 |
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 } |