summaryrefslogtreecommitdiff
path: root/vendor/github.com/blang/semver/semver.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-02-22 05:28:21 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2020-02-25 07:46:20 -0400
commit68c313911e8a3aed605a12398442212b99f41619 (patch)
treec4273c58fd0a675d02daef9a63bc6ce9c38e4c11 /vendor/github.com/blang/semver/semver.go
parent8a30759b6b7f73c76c90e0931e6cf1ca3d94ee61 (diff)
downloadpodman-68c313911e8a3aed605a12398442212b99f41619.tar.gz
podman-68c313911e8a3aed605a12398442212b99f41619.tar.bz2
podman-68c313911e8a3aed605a12398442212b99f41619.zip
Update vendor of buildah and containers/common
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/blang/semver/semver.go')
-rw-r--r--vendor/github.com/blang/semver/semver.go23
1 files changed, 0 insertions, 23 deletions
diff --git a/vendor/github.com/blang/semver/semver.go b/vendor/github.com/blang/semver/semver.go
index 8ee0842e6..bbf85ce97 100644
--- a/vendor/github.com/blang/semver/semver.go
+++ b/vendor/github.com/blang/semver/semver.go
@@ -200,29 +200,6 @@ func Make(s string) (Version, error) {
return Parse(s)
}
-// ParseTolerant allows for certain version specifications that do not strictly adhere to semver
-// specs to be parsed by this library. It does so by normalizing versions before passing them to
-// Parse(). It currently trims spaces, removes a "v" prefix, and adds a 0 patch number to versions
-// with only major and minor components specified
-func ParseTolerant(s string) (Version, error) {
- s = strings.TrimSpace(s)
- s = strings.TrimPrefix(s, "v")
-
- // Split into major.minor.(patch+pr+meta)
- parts := strings.SplitN(s, ".", 3)
- if len(parts) < 3 {
- if strings.ContainsAny(parts[len(parts)-1], "+-") {
- return Version{}, errors.New("Short version cannot contain PreRelease/Build meta data")
- }
- for len(parts) < 3 {
- parts = append(parts, "0")
- }
- s = strings.Join(parts, ".")
- }
-
- return Parse(s)
-}
-
// Parse parses version string and returns a validated Version or error
func Parse(s string) (Version, error) {
if len(s) == 0 {