mirror of https://github.com/containers/image.git
Run codespell on code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
5cb6ee2c17
commit
968e9a510b
|
|
@ -51,7 +51,7 @@ const (
|
|||
// other than the ones the caller specifically allows.
|
||||
// expectedMIMEType is used only for diagnostics.
|
||||
// NOTE: The caller should do the non-heuristic validations (e.g. check for any specified format
|
||||
// identification/version, or other “magic numbers”) before calling this, to cleanly reject unambigous
|
||||
// identification/version, or other “magic numbers”) before calling this, to cleanly reject unambiguous
|
||||
// data that just isn’t what was expected, as opposed to actually ambiguous data.
|
||||
func validateUnambiguousManifestFormat(manifest []byte, expectedMIMEType string,
|
||||
allowed allowedManifestFields) error {
|
||||
|
|
@ -71,7 +71,7 @@ func validateUnambiguousManifestFormat(manifest []byte, expectedMIMEType string,
|
|||
Manifests interface{} `json:"manifests"`
|
||||
}{}
|
||||
if err := json.Unmarshal(manifest, &detectedFields); err != nil {
|
||||
// The caller was supposed to already validate version numbers, so this shold not happen;
|
||||
// The caller was supposed to already validate version numbers, so this should not happen;
|
||||
// let’s not bother with making this error “nice”.
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ func createTarFromSIFInputs(ctx context.Context, tarPath, squashFSPath string, i
|
|||
}
|
||||
|
||||
// convertSIFToElements processes sifImage and creates/returns
|
||||
// the relevant elements for contructing an OCI-like image:
|
||||
// the relevant elements for constructing an OCI-like image:
|
||||
// - A path to a tar file containing a root filesystem,
|
||||
// - A command to run.
|
||||
// The returned tar file path is inside tempDir, which can be assumed to be empty
|
||||
|
|
@ -166,7 +166,7 @@ func convertSIFToElements(ctx context.Context, sifImage *sif.FileImage, tempDir
|
|||
// So, overall, this process requires at least 2 compressed copies (SIF and squashFSPath) and 2
|
||||
// uncompressed copies (extractedRootPath and tarPath) of the data, all using up space at the same time.
|
||||
// That's rather unsatisfactory, ideally we would be streaming the data directly from a squashfs parser
|
||||
// reading from the SIF file to a tarball, for 1 compresed and 1 uncompressed copy.
|
||||
// reading from the SIF file to a tarball, for 1 compressed and 1 uncompressed copy.
|
||||
defer os.Remove(squashFSPath)
|
||||
defer func() {
|
||||
if !succeeded {
|
||||
|
|
|
|||
Loading…
Reference in New Issue