Skip to content
This repository was archived by the owner on Jan 15, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions image/descriptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ func listReferences(w walker) (map[string]*v1.Descriptor, error) {
}

for i := 0; i < len(index.Manifests); i++ {
if index.Manifests[i].Annotations["org.opencontainers.ref.name"] != "" {
refs[index.Manifests[i].Annotations["org.opencontainers.ref.name"]] = &index.Manifests[i]
if index.Manifests[i].Annotations["org.opencontainers.image.ref.name"] != "" {
refs[index.Manifests[i].Annotations["org.opencontainers.image.ref.name"]] = &index.Manifests[i]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since #163 bumped image-spec to 1.0.0, you can use AnnotationRefName instead of a string literal.

}
}

Expand All @@ -65,7 +65,7 @@ func findDescriptor(w walker, name string) (*v1.Descriptor, error) {
}

for i := 0; i < len(index.Manifests); i++ {
if index.Manifests[i].Annotations["org.opencontainers.ref.name"] == name {
if index.Manifests[i].Annotations["org.opencontainers.image.ref.name"] == name {
d = index.Manifests[i]
return errEOW
}
Expand Down
4 changes: 2 additions & 2 deletions image/image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ var (
"size": <manifest_size>,
"digest": "<manifest_digest>",
"annotations": {
"org.opencontainers.ref.name": "v1.0"
"org.opencontainers.image.ref.name": "v1.0"
}
},
{
Expand All @@ -110,7 +110,7 @@ var (
"os": "linux"
},
"annotations": {
"org.opencontainers.ref.name": "latest"
"org.opencontainers.image.ref.name": "latest"
}
},
{
Expand Down