imageMatchesRepo returns true iff image.Names contains an element with the same repo as ref
(image *storage.Image, ref reference.Named)
| 52 | |
| 53 | // imageMatchesRepo returns true iff image.Names contains an element with the same repo as ref |
| 54 | func imageMatchesRepo(image *storage.Image, ref reference.Named) bool { |
| 55 | repo := ref.Name() |
| 56 | return slices.ContainsFunc(image.Names, func(name string) bool { |
| 57 | if named, err := reference.ParseNormalizedNamed(name); err == nil && named.Name() == repo { |
| 58 | return true |
| 59 | } |
| 60 | return false |
| 61 | }) |
| 62 | } |
| 63 | |
| 64 | // multiArchImageMatchesSystemContext returns true if the passed-in image both contains a |
| 65 | // multi-arch manifest that matches the passed-in digest, and the image is the per-platform |
no test coverage detected
searching dependent graphs…