mirror of
https://github.com/containers/podman.git
synced 2025-11-30 10:07:33 +08:00
pkg/machine: remove deadcode
Yes this is a lot. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@@ -10,9 +10,7 @@ import (
|
||||
"github.com/containers/buildah/pkg/parse"
|
||||
"github.com/containers/image/v5/copy"
|
||||
"github.com/containers/image/v5/oci/layout"
|
||||
"github.com/containers/image/v5/pkg/shortnames"
|
||||
"github.com/containers/image/v5/signature"
|
||||
"github.com/containers/image/v5/transports/alltransports"
|
||||
"github.com/containers/image/v5/types"
|
||||
"github.com/containers/podman/v5/pkg/machine/define"
|
||||
"github.com/sirupsen/logrus"
|
||||
@@ -95,16 +93,3 @@ func Pull(ctx context.Context, imageInput types.ImageReference, localDestPath *d
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func stringToImageReference(imageInput string) (types.ImageReference, error) { //nolint:unused
|
||||
if shortnames.IsShortName(imageInput) {
|
||||
return nil, fmt.Errorf("pulling source images by short name (%q) is not supported, please use a fully-qualified name", imageInput)
|
||||
}
|
||||
|
||||
ref, err := alltransports.ParseImageName("docker://" + imageInput)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("parsing image name: %w", err)
|
||||
}
|
||||
|
||||
return ref, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user