summaryrefslogtreecommitdiff
path: root/cmd/btrfs-rec/inspect_lstrees.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2022-12-24 23:55:03 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2022-12-26 23:55:42 -0700
commit74bb10779338bbb06be44a523d1e166b760018f7 (patch)
tree3475918a6fbbdb4a42ea379b87d883132e33c7d1 /cmd/btrfs-rec/inspect_lstrees.go
parenta90e25a1298602c30d0b9cc0c86acede7c8e4ed4 (diff)
tree-wide: Audit for fmt.Fprint usage, in favor of textui
Diffstat (limited to 'cmd/btrfs-rec/inspect_lstrees.go')
-rw-r--r--cmd/btrfs-rec/inspect_lstrees.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/cmd/btrfs-rec/inspect_lstrees.go b/cmd/btrfs-rec/inspect_lstrees.go
index e0dc4e1..7f59eaa 100644
--- a/cmd/btrfs-rec/inspect_lstrees.go
+++ b/cmd/btrfs-rec/inspect_lstrees.go
@@ -6,7 +6,6 @@ package main
import (
"encoding/json"
- "fmt"
"os"
"strconv"
"text/tabwriter"
@@ -58,11 +57,11 @@ func init() {
numWidth := len(strconv.Itoa(slices.Max(treeErrCnt, totalItems)))
table := tabwriter.NewWriter(os.Stdout, 0, 8, 2, ' ', 0)
- fmt.Fprintf(table, " errors\t% *s\n", numWidth, strconv.Itoa(treeErrCnt))
+ textui.Fprintf(table, " errors\t% *s\n", numWidth, strconv.Itoa(treeErrCnt))
for _, typ := range maps.SortedKeys(treeItemCnt) {
- fmt.Fprintf(table, " %v items\t% *s\n", typ, numWidth, strconv.Itoa(treeItemCnt[typ]))
+ textui.Fprintf(table, " %v items\t% *s\n", typ, numWidth, strconv.Itoa(treeItemCnt[typ]))
}
- fmt.Fprintf(table, " total items\t% *s\n", numWidth, strconv.Itoa(totalItems))
+ textui.Fprintf(table, " total items\t% *s\n", numWidth, strconv.Itoa(totalItems))
table.Flush()
}
visitedNodes := make(containers.Set[btrfsvol.LogicalAddr])