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

Function getDefaultReleaseForDistro

src/pkg/utils/utils.go:347–364  ·  view source on GitHub ↗
(distro string)

Source from the content-addressed store, hash-verified

345}
346
347func getDefaultReleaseForDistro(distro string) (string, error) {
348 if distro == "" {
349 panic("distro not specified")
350 }
351
352 distroObj, supportedDistro := supportedDistros[distro]
353 if !supportedDistro {
354 panicMsg := fmt.Sprintf("failed to find %s in the list of supported distributions", distro)
355 panic(panicMsg)
356 }
357
358 release, err := distroObj.GetDefaultRelease()
359 if err != nil {
360 return "", err
361 }
362
363 return release, nil
364}
365
366func GetEnvOptionsForPreservedVariables() []string {
367 logrus.Debug("Creating list of environment variables to forward")

Callers 1

initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…