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

Function getDefaultImageForDistro

src/pkg/utils/utils.go:332–345  ·  view source on GitHub ↗
(distro, release string)

Source from the content-addressed store, hash-verified

330}
331
332func getDefaultImageForDistro(distro, release string) string {
333 if distro == "" {
334 panic("distro not specified")
335 }
336
337 distroObj, supportedDistro := supportedDistros[distro]
338 if !supportedDistro {
339 panicMsg := fmt.Sprintf("failed to find %s in the list of supported distributions", distro)
340 panic(panicMsg)
341 }
342
343 image := distroObj.ImageBasename + ":" + release
344 return image
345}
346
347func getDefaultReleaseForDistro(distro string) (string, error) {
348 if distro == "" {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…