summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-02-13 15:42:58 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-02-13 15:42:58 -0700
commit2098ac287002f090a02baf82fd5dda1bc3753e25 (patch)
tree103618be679f606fde39c07173534a38ddd2f38a /cmd
parenta29f4c3421cd8deb2b0f578acb195442569236b7 (diff)
parent25cbf5fbe8c5be5f3c3dabd694668fa7454a05b9 (diff)
Merge branch 'lukeshu/rebuild-nodes-take5'
Diffstat (limited to 'cmd')
-rw-r--r--cmd/btrfs-rec/inspect_rebuildnodes.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/btrfs-rec/inspect_rebuildnodes.go b/cmd/btrfs-rec/inspect_rebuildnodes.go
index e8f9ada..ba1dcab 100644
--- a/cmd/btrfs-rec/inspect_rebuildnodes.go
+++ b/cmd/btrfs-rec/inspect_rebuildnodes.go
@@ -57,8 +57,9 @@ func init() {
dlog.Errorf(ctx, "rebuild error: %v", rebuildErr)
}
dlog.Infof(ctx, "Writing re-built nodes to %s...", dst.Name())
- if err := writeJSONFile(dst, rebuilder.ListRoots(), lowmemjson.ReEncoderConfig{
+ if err := writeJSONFile(dst, rebuilder.ListRoots(ctx), lowmemjson.ReEncoderConfig{
Indent: "\t",
+ CompactIfUnder: 80, //nolint:gomnd // This is what looks nice.
ForceTrailingNewlines: true,
}); err != nil {
if rebuildErr != nil {