From 83886d4925e3d1d9c2c5d9cca4dd165597e54864 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 3 Apr 2023 15:06:31 -0600 Subject: btrfsutil: Rename unexported types to be clearer about which system they belong to MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - nodeInfo → oldRebuiltNodeInfo (old_rebuilt_forrest.go) - itemStats → rebuiltItemStats (rebuilt_tree.go) - rootStats → rebuiltRootStats (rebuilt_tree.go) - nodeScanner → nodeLister (listnodes.go) - nodeStats → nodeListStats (listnodes.go) - scanStats → devScanStats (scan.go) --- lib/btrfsutil/scan.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/btrfsutil/scan.go') diff --git a/lib/btrfsutil/scan.go b/lib/btrfsutil/scan.go index 0e268e5..bf848ee 100644 --- a/lib/btrfsutil/scan.go +++ b/lib/btrfsutil/scan.go @@ -33,12 +33,12 @@ type DeviceScanner[Stats comparable, Result any] interface { ScanDone(ctx context.Context) (Result, error) } -type scanStats[T comparable] struct { +type devScanStats[T comparable] struct { portion textui.Portion[btrfsvol.PhysicalAddr] stats T } -func (s scanStats[T]) String() string { +func (s devScanStats[T]) String() string { return textui.Sprintf("scanned %v (%v)", s.portion, s.stats) } @@ -91,8 +91,8 @@ func ScanOneDevice[Stats comparable, Result any](ctx context.Context, dev *btrfs scanner := newScanner(ctx, *sb, numBytes, numSectors) - progressWriter := textui.NewProgress[scanStats[Stats]](ctx, dlog.LogLevelInfo, textui.Tunable(1*time.Second)) - var stats scanStats[Stats] + progressWriter := textui.NewProgress[devScanStats[Stats]](ctx, dlog.LogLevelInfo, textui.Tunable(1*time.Second)) + var stats devScanStats[Stats] stats.portion.D = numBytes var minNextNode btrfsvol.PhysicalAddr -- cgit v1.2.3-2-g168b