mirror of https://github.com/docker/cli.git
formatter: Consider empty RepoTags and RepoDigests as dangling
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 89687d5b3f
)
This commit is contained in:
parent
715524332f
commit
a6412f81cd
|
@ -27,6 +27,9 @@ type ImageContext struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func isDangling(image types.ImageSummary) bool {
|
func isDangling(image types.ImageSummary) bool {
|
||||||
|
if len(image.RepoTags) == 0 && len(image.RepoDigests) == 0 {
|
||||||
|
return true
|
||||||
|
}
|
||||||
return len(image.RepoTags) == 1 && image.RepoTags[0] == "<none>:<none>" && len(image.RepoDigests) == 1 && image.RepoDigests[0] == "<none>@<none>"
|
return len(image.RepoTags) == 1 && image.RepoTags[0] == "<none>:<none>" && len(image.RepoDigests) == 1 && image.RepoDigests[0] == "<none>@<none>"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue