summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2019-01-09 19:12:17 +0100
committerMiloslav Trmač <mitr@redhat.com>2019-01-14 04:07:23 +0100
commit788bc360219e83028b3b0996ab4b6afbd0530e9c (patch)
treeeba47ed79efbf089223c27a207af199417cf85cc /libpod
parente9721b757ae5da4dad4f68c5eb721f348cfe935a (diff)
downloadpodman-788bc360219e83028b3b0996ab4b6afbd0530e9c.tar.gz
podman-788bc360219e83028b3b0996ab4b6afbd0530e9c.tar.bz2
podman-788bc360219e83028b3b0996ab4b6afbd0530e9c.zip
Simplify pullGoalFromPossiblyUnqualifiedName
Both imageParts and this function implicitly assume docker.Transport troughout, so instead of pretending to be flexible about DefaultTransport, just hard-code docker.ParseReference directly. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/image/pull.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/image/pull.go b/libpod/image/pull.go
index 342ee6f17..d4be53ef8 100644
--- a/libpod/image/pull.go
+++ b/libpod/image/pull.go
@@ -290,7 +290,7 @@ func (ir *Runtime) pullGoalFromPossiblyUnqualifiedName(inputName string) (*pullG
} else {
imageName = decomposedImage.assemble()
}
- srcRef, err := alltransports.ParseImageName(fmt.Sprintf("%s%s", DefaultTransport, imageName))
+ srcRef, err := docker.ParseReference("//" + imageName)
if err != nil {
return nil, errors.Wrapf(err, "unable to parse '%s'", inputName)
}
@@ -322,7 +322,7 @@ func (ir *Runtime) pullGoalFromPossiblyUnqualifiedName(inputName string) (*pullG
if hasShaInInputName(inputName) {
imageName = fmt.Sprintf("%s/%s", registry, inputName)
}
- srcRef, err := alltransports.ParseImageName(fmt.Sprintf("%s%s", DefaultTransport, imageName))
+ srcRef, err := docker.ParseReference("//" + imageName)
if err != nil {
return nil, errors.Wrapf(err, "unable to parse '%s'", inputName)
}