summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-07-15 07:53:28 -0400
committerGitHub <noreply@github.com>2020-07-15 07:53:28 -0400
commit5262c53598ea579db0487587f60f088c68dc1190 (patch)
tree4acfcbf240b01297adeb9f90b381c5e11d52c5de /pkg
parent373ba8c017a0b5d298a0f53e60bd2069df0173a6 (diff)
parent660208cea38fdebb302f674b40bfd755f02def2d (diff)
downloadpodman-5262c53598ea579db0487587f60f088c68dc1190.tar.gz
podman-5262c53598ea579db0487587f60f088c68dc1190.tar.bz2
podman-5262c53598ea579db0487587f60f088c68dc1190.zip
Merge pull request #6921 from vrothberg/2.0-wildcard-search
[2.0] 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 927e7a62a..ab7accd5e 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/v2/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
-}