Skip to content

Commit

Permalink
update annotations
Browse files Browse the repository at this point in the history
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
  • Loading branch information
zhouhao committed Jul 27, 2017
1 parent 2b3754c commit 628a7c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions image/descriptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,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]
}
}

Expand All @@ -67,7 +67,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 @@ -101,7 +101,7 @@ var (
"size": <index_size>,
"digest": "<index_digest>",
"annotations": {
"org.opencontainers.ref.name": "v1.0"
"org.opencontainers.image.ref.name": "v1.0"
}
},
{
Expand All @@ -113,7 +113,7 @@ var (
"os": "linux"
},
"annotations": {
"org.opencontainers.ref.name": "latest"
"org.opencontainers.image.ref.name": "latest"
}
}
],
Expand Down

0 comments on commit 628a7c0

Please sign in to comment.