MCPcopy
hub / github.com/containers/toolbox / getContainerNamePrefixForImage

Function getContainerNamePrefixForImage

src/pkg/utils/utils.go:315–330  ·  view source on GitHub ↗
(image string)

Source from the content-addressed store, hash-verified

313}
314
315func getContainerNamePrefixForImage(image string) (string, error) {
316 basename := ImageReferenceGetBasename(image)
317 if basename == "" {
318 return "", &ImageError{image, ErrImageWithoutBasename}
319 }
320
321 for _, distroObj := range supportedDistros {
322 if distroObj.ImageBasename != basename {
323 continue
324 }
325
326 return distroObj.ContainerNamePrefix, nil
327 }
328
329 return basename, nil
330}
331
332func getDefaultImageForDistro(distro, release string) string {
333 if distro == "" {

Callers 1

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…