From 3e65b5dbcb6253d3fdbca2fe847ab6b0afac4fe4 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Mon, 6 May 2019 22:25:15 +0100 Subject: [PATCH] vendor: github.com/hashicorp/go-version@v1.2.0 --- go.mod | 2 +- go.sum | 2 ++ vendor/github.com/hashicorp/go-version/.travis.yml | 4 ++-- vendor/github.com/hashicorp/go-version/version.go | 12 +++++++++++- vendor/modules.txt | 2 +- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index b09691cab..a2bb25ae3 100644 --- a/go.mod +++ b/go.mod @@ -47,7 +47,7 @@ require ( github.com/hashicorp/go-retryablehttp v0.5.2 // indirect github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90 // indirect github.com/hashicorp/go-uuid v1.0.1 - github.com/hashicorp/go-version v1.1.0 + github.com/hashicorp/go-version v1.2.0 github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/serf v0.8.2 // indirect github.com/hashicorp/vault v1.1.0 diff --git a/go.sum b/go.sum index d800c2cfc..79d921747 100644 --- a/go.sum +++ b/go.sum @@ -187,6 +187,8 @@ github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1 github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.1.0 h1:bPIoEKD27tNdebFGGxxYwcL4nepeY4j1QP23PFRGzg0= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.2.0 h1:3vNe/fWF5CBgRIguda1meWhsZHy3m8gCJ5wx+dIzX/E= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= diff --git a/vendor/github.com/hashicorp/go-version/.travis.yml b/vendor/github.com/hashicorp/go-version/.travis.yml index 542ca8b7f..01c5dc219 100644 --- a/vendor/github.com/hashicorp/go-version/.travis.yml +++ b/vendor/github.com/hashicorp/go-version/.travis.yml @@ -1,13 +1,13 @@ language: go go: - - 1.0 - - 1.1 - 1.2 - 1.3 - 1.4 - 1.9 - "1.10" + - 1.11 + - 1.12 script: - go test diff --git a/vendor/github.com/hashicorp/go-version/version.go b/vendor/github.com/hashicorp/go-version/version.go index 186fd7cc1..1032c5606 100644 --- a/vendor/github.com/hashicorp/go-version/version.go +++ b/vendor/github.com/hashicorp/go-version/version.go @@ -112,7 +112,7 @@ func Must(v *Version, err error) *Version { // or larger than the other version, respectively. // // If you want boolean results, use the LessThan, Equal, -// or GreaterThan methods. +// GreaterThan, GreaterThanOrEqual or LessThanOrEqual methods. func (v *Version) Compare(other *Version) int { // A quick, efficient equality check if v.String() == other.String() { @@ -288,11 +288,21 @@ func (v *Version) GreaterThan(o *Version) bool { return v.Compare(o) > 0 } +// GreaterThanOrEqualTo tests if this version is greater than or equal to another version. +func (v *Version) GreaterThanOrEqual(o *Version) bool { + return v.Compare(o) >= 0 +} + // LessThan tests if this version is less than another version. func (v *Version) LessThan(o *Version) bool { return v.Compare(o) < 0 } +// LessThanOrEqualTo tests if this version is less than or equal to another version. +func (v *Version) LessThanOrEqual(o *Version) bool { + return v.Compare(o) <= 0 +} + // Metadata returns any metadata that was part of the version // string. // diff --git a/vendor/modules.txt b/vendor/modules.txt index 8b707c5c1..3c73bce8b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -253,7 +253,7 @@ github.com/hashicorp/go-safetemp github.com/hashicorp/go-sockaddr # github.com/hashicorp/go-uuid v1.0.1 github.com/hashicorp/go-uuid -# github.com/hashicorp/go-version v1.1.0 +# github.com/hashicorp/go-version v1.2.0 github.com/hashicorp/go-version # github.com/hashicorp/golang-lru v0.5.0 github.com/hashicorp/golang-lru/simplelru