🔧 Extract common func into api function, also set sane defaults

This commit is contained in:
Ettore Di Giacinto
2021-12-28 18:55:59 +01:00
parent 719ef16161
commit 196cdc5cfc
8 changed files with 171 additions and 27 deletions

View File

@@ -22,6 +22,7 @@ import (
"github.com/google/go-containerregistry/pkg/crane"
v1 "github.com/google/go-containerregistry/pkg/v1"
bus "github.com/mudler/luet/pkg/api/core/bus"
"github.com/mudler/luet/pkg/api/core/image"
"github.com/mudler/luet/pkg/api/core/types"
"github.com/pkg/errors"
@@ -135,7 +136,7 @@ func (s *SimpleImg) CopyImage(src, dst string) error {
}
func (s *SimpleImg) ImageAvailable(imagename string) bool {
return imageAvailable(imagename)
return image.Available(imagename)
}
// ImageExists check if the given image is available locally