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:
parent
a9c47ffc50
commit
02aed32bf2
1 changed files with 5 additions and 5 deletions
|
@ -54,18 +54,18 @@ func Export(
|
||||||
}
|
}
|
||||||
|
|
||||||
// if it's a regular file, retrieve and write the contents
|
// 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 {
|
if err != nil {
|
||||||
return fmt.Errorf("unable to lookup blob: %w", err)
|
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 {
|
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 {
|
if err != nil {
|
||||||
return fmt.Errorf("unable to close content reader: %w", err)
|
return fmt.Errorf("unable to close content reader: %w", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue