refactor(tvix/nar-bridge): rename contentReader to blobReader

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
This commit is contained in:
Florian Klink 2023-09-18 12:34:33 +03:00 committed by flokli
parent a9c47ffc50
commit 02aed32bf2

View file

@ -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)
}