diff options
Diffstat (limited to 'vendor/github.com/containers/buildah/util/util.go')
-rw-r--r-- | vendor/github.com/containers/buildah/util/util.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/github.com/containers/buildah/util/util.go b/vendor/github.com/containers/buildah/util/util.go index 3b22a3943..5e52a4f65 100644 --- a/vendor/github.com/containers/buildah/util/util.go +++ b/vendor/github.com/containers/buildah/util/util.go @@ -482,3 +482,13 @@ func SortMounts(m []specs.Mount) []specs.Mount { sort.Sort(byDestination(m)) return m } + +func VerifyTagName(imageSpec string) (types.ImageReference, error) { + ref, err := alltransports.ParseImageName(imageSpec) + if err != nil { + if ref, err = alltransports.ParseImageName(DefaultTransport + imageSpec); err != nil { + return nil, err + } + } + return ref, nil +} |