summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-20 05:57:25 -0400
committerGitHub <noreply@github.com>2020-06-20 05:57:25 -0400
commitf403aa3baa23a64e7d6bf3fcbc815644d95b768d (patch)
treeae757f33f5fe2efc4351e5983a8e864cec68250a /pkg
parent60425c96d06c9666e8ba310579a08173aee81839 (diff)
parentb05888a97dbb45a205ff535538ecdd91a19c6ae3 (diff)
downloadpodman-f403aa3baa23a64e7d6bf3fcbc815644d95b768d.tar.gz
podman-f403aa3baa23a64e7d6bf3fcbc815644d95b768d.tar.bz2
podman-f403aa3baa23a64e7d6bf3fcbc815644d95b768d.zip
Merge pull request #6621 from vrothberg/bz-1846629
search: allow wildcards
Diffstat (limited to 'pkg')
-rw-r--r--pkg/registries/registries.go16
1 files changed, 0 insertions, 16 deletions
diff --git a/pkg/registries/registries.go b/pkg/registries/registries.go
index ba7de7cf9..4827b7012 100644
--- a/pkg/registries/registries.go
+++ b/pkg/registries/registries.go
@@ -3,12 +3,10 @@ package registries
import (
"os"
"path/filepath"
- "strings"
"github.com/containers/image/v5/pkg/sysregistriesv2"
"github.com/containers/image/v5/types"
"github.com/containers/libpod/pkg/rootless"
- "github.com/docker/distribution/reference"
"github.com/pkg/errors"
)
@@ -77,17 +75,3 @@ func GetInsecureRegistries() ([]string, error) {
}
return insecureRegistries, nil
}
-
-// GetRegistry returns the registry name from a string if specified
-func GetRegistry(image string) (string, error) {
- // It is possible to only have the registry name in the format "myregistry/"
- // if so, just trim the "/" from the end and return the registry name
- if strings.HasSuffix(image, "/") {
- return strings.TrimSuffix(image, "/"), nil
- }
- imgRef, err := reference.Parse(image)
- if err != nil {
- return "", err
- }
- return reference.Domain(imgRef.(reference.Named)), nil
-}