(distro, release string)
| 724 | } |
| 725 | |
| 726 | func 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. |
| 743 | func PathExists(path string) bool { |
no outgoing calls
searching dependent graphs…