MCPcopy Index your code
hub / github.com/containers/toolbox / parseRelease

Function parseRelease

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

Source from the content-addressed store, hash-verified

724}
725
726func parseRelease(distro, release string) (string, error) {
727 if distro == "" {
728 panic("distro not specified")
729 }
730
731 distroObj, supportedDistro := supportedDistros[distro]
732 if !supportedDistro {
733 panicMsg := fmt.Sprintf("failed to find %s in the list of supported distributions", distro)
734 panic(panicMsg)
735 }
736
737 parseReleaseImpl := distroObj.ParseRelease
738 release, err := parseReleaseImpl(release)
739 return release, err
740}
741
742// PathExists wraps around os.Stat providing a nice interface for checking an existence of a path.
743func PathExists(path string) bool {

Callers 2

TestParseReleaseFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestParseReleaseFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…