pkg/utils: Use global default instead of magic value

Found while working on https://github.com/containers/toolbox/issues/937

https://github.com/containers/toolbox/pull/977
This commit is contained in:
Ondřej Míchal 2022-01-09 16:54:41 +02:00
parent 02f45fd3f2
commit 5c8ad7a7ec
1 changed files with 2 additions and 2 deletions

View File

@ -250,7 +250,7 @@ func GetContainerNamePrefixForImage(image string) (string, error) {
func getDefaultImageForDistro(distro, release string) string { func getDefaultImageForDistro(distro, release string) string {
if !IsDistroSupported(distro) { if !IsDistroSupported(distro) {
distro = "fedora" distro = distroDefault
} }
distroObj, supportedDistro := supportedDistros[distro] distroObj, supportedDistro := supportedDistros[distro]
@ -647,7 +647,7 @@ func ParseRelease(distro, release string) (string, error) {
} }
if !IsDistroSupported(distro) { if !IsDistroSupported(distro) {
distro = "fedora" distro = distroDefault
} }
distroObj, supportedDistro := supportedDistros[distro] distroObj, supportedDistro := supportedDistros[distro]