Don't document the precise file position of a returned file

The callers don't really need to know, and this way we don't
need to get the details of the syntax correct.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
Miloslav Trmač 2025-05-06 22:36:26 +02:00
parent 432a72f539
commit 0ad3d51e5a
1 changed files with 2 additions and 2 deletions

View File

@ -182,8 +182,8 @@ func openTmpFileNoTmpFile(tmpDir string) (*os.File, error) {
// readZstdChunkedManifest reads the zstd:chunked manifest from the seekable stream blobStream.
// tmpDir is a directory where the tar-split temporary file is written to. The file is opened with
// O_TMPFILE so that it is automatically removed when it is closed.
// Returns (manifest blob, parsed manifest, tar-split file or nil, manifest offset). The opened tar-split file
// points to the end of the file (equivalent to Seek(0, 2)).
// Returns (manifest blob, parsed manifest, tar-split file or nil, manifest offset).
// The opened tar-split files position is unspecified.
// It may return an error matching ErrFallbackToOrdinaryLayerDownload / errFallbackCanConvert.
func readZstdChunkedManifest(tmpDir string, blobStream ImageSourceSeekable, tocDigest digest.Digest, annotations map[string]string) (_ []byte, _ *minimal.TOC, _ *os.File, _ int64, retErr error) {
offsetMetadata := annotations[minimal.ManifestInfoKey]