about summary refs log tree commit diff
path: root/tvix/nar-bridge/pkg/writer/writer.go
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-09-18T09·34+0300
committerflokli <flokli@flokli.de>2023-09-18T14·02+0000
commit02aed32bf2627a969c15f358737abf5acb697dd4 (patch)
tree736be8189489d63a76d0f30cc9f8011058cb487d /tvix/nar-bridge/pkg/writer/writer.go
parenta9c47ffc506a0f3bc3fd54120f9a58e77176e94c (diff)
refactor(tvix/nar-bridge): rename contentReader to blobReader r/6615
More aligned with how it's called in other places

Change-Id: I759ac7ca3b5b69c1101d2d51a569d76c183a6330
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9362
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/nar-bridge/pkg/writer/writer.go')
-rw-r--r--tvix/nar-bridge/pkg/writer/writer.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/tvix/nar-bridge/pkg/writer/writer.go b/tvix/nar-bridge/pkg/writer/writer.go
index 25510f933e3a..e69cf27f2a50 100644
--- a/tvix/nar-bridge/pkg/writer/writer.go
+++ b/tvix/nar-bridge/pkg/writer/writer.go
@@ -54,18 +54,18 @@ func Export(
 		}
 
 		// if it's a regular file, retrieve and write the contents
-		contentReader, err := blobLookupFn(v.File.GetDigest())
+		blobReader, err := blobLookupFn(v.File.GetDigest())
 		if err != nil {
 			return fmt.Errorf("unable to lookup blob: %w", err)
 		}
-		defer contentReader.Close()
+		defer blobReader.Close()
 
-		_, err = io.Copy(narWriter, contentReader)
+		_, err = io.Copy(narWriter, blobReader)
 		if err != nil {
-			return fmt.Errorf("unable to copy contents from contentReader: %w", err)
+			return fmt.Errorf("unable to read from blobReader: %w", err)
 		}
 
-		err = contentReader.Close()
+		err = blobReader.Close()
 		if err != nil {
 			return fmt.Errorf("unable to close content reader: %w", err)
 		}