Skip to content

Commit

Permalink
pkg/remote/oci: refer to the manifest as manifest
Browse files Browse the repository at this point in the history
Signed-off-by: Bjorn Neergaard <[email protected]>
  • Loading branch information
neersighted authored and ndeloof committed Sep 29, 2023
1 parent bd74a92 commit 991901f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/remote/oci.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,17 @@ func (g ociRemoteLoader) Load(ctx context.Context, path string) (string, error)
}
defer f.Close() //nolint:errcheck

var descriptor v1.Manifest
err = json.Unmarshal(content, &descriptor)
var manifest v1.Manifest
err = json.Unmarshal(content, &manifest)
if err != nil {
return "", err
}

if descriptor.Config.MediaType != "application/vnd.docker.compose.project" {
return "", fmt.Errorf("%s is not a compose project OCI artifact, but %s", ref.String(), descriptor.Config.MediaType)
if manifest.Config.MediaType != "application/vnd.docker.compose.project" {
return "", fmt.Errorf("%s is not a compose project OCI artifact, but %s", ref.String(), manifest.Config.MediaType)
}

for i, layer := range descriptor.Layers {
for i, layer := range manifest.Layers {
digested, err := reference.WithDigest(ref, layer.Digest)
if err != nil {
return "", err
Expand Down

0 comments on commit 991901f

Please sign in to comment.