From 6bc866c70b1bc1cda11dd9e456e0d2e8d3e535d0 Mon Sep 17 00:00:00 2001 From: Services Enablement CI Date: Fri, 18 Aug 2023 12:16:17 +0000 Subject: [PATCH] Bump ODB SDK to latest. --- go.mod | 4 +- go.sum | 8 +-- .../go-playground/validator/v10/baked_in.go | 62 ++++++++++++++----- .../go-playground/validator/v10/util.go | 12 +++- vendor/modules.txt | 4 +- 5 files changed, 65 insertions(+), 25 deletions(-) diff --git a/go.mod b/go.mod index 8a096617..d9f5d483 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0 github.com/onsi/ginkgo v1.16.5 github.com/onsi/gomega v1.27.10 - github.com/pivotal-cf/on-demand-services-sdk v0.43.3-0.20230816125140-809e62e8b09b + github.com/pivotal-cf/on-demand-services-sdk v0.43.3-0.20230818121449-a0ae6e213dcf gopkg.in/yaml.v2 v2.4.0 ) @@ -21,7 +21,7 @@ require ( github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.15.0 // indirect + github.com/go-playground/validator/v10 v10.15.1 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/go-cmp v0.5.9 // indirect diff --git a/go.sum b/go.sum index 571faf87..531bf6fc 100644 --- a/go.sum +++ b/go.sum @@ -27,8 +27,8 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.15.0 h1:nDU5XeOKtB3GEa+uB7GNYwhVKsgjAR7VgKoNB6ryXfw= -github.com/go-playground/validator/v10 v10.15.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.15.1 h1:BSe8uhN+xQ4r5guV/ywQI4gO59C2raYcGffYWZEjZzM= +github.com/go-playground/validator/v10 v10.15.1/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= @@ -99,8 +99,8 @@ github.com/pierrec/lz4/v4 v4.1.17 h1:kV4Ip+/hUBC+8T6+2EgburRtkE9ef4nbY3f4dFhGjMc github.com/pierrec/lz4/v4 v4.1.17/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pivotal-cf/brokerapi/v10 v10.0.0 h1:cC2zdIF1jh1twD196xWpHjiX2JEbU+RMLH2jpmLDRT8= github.com/pivotal-cf/brokerapi/v10 v10.0.0/go.mod h1:LVexXnzj0Zj7lxIJXnDqc794/XHwEzkOPzAZdEaKM5M= -github.com/pivotal-cf/on-demand-services-sdk v0.43.3-0.20230816125140-809e62e8b09b h1:svlrQAXZCXvk2J1TjzIRvBxBTIWFmNVkCl/nu3gqpTA= -github.com/pivotal-cf/on-demand-services-sdk v0.43.3-0.20230816125140-809e62e8b09b/go.mod h1:Rx7+gQOmY1rLHse+jeG8NdlblEQAGzQ0GFG/F3gM16c= +github.com/pivotal-cf/on-demand-services-sdk v0.43.3-0.20230818121449-a0ae6e213dcf h1:UGHli6jFzvKdX2IKz/G7UQRc4Mekg/Av7CzFELc1ZBk= +github.com/pivotal-cf/on-demand-services-sdk v0.43.3-0.20230818121449-a0ae6e213dcf/go.mod h1:vJpw4Uam71DQAKebsHNMimLi9li1EgNbcyANfXKji8w= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/vendor/github.com/go-playground/validator/v10/baked_in.go b/vendor/github.com/go-playground/validator/v10/baked_in.go index f7b55ab3..ca9eeb1d 100644 --- a/vendor/github.com/go-playground/validator/v10/baked_in.go +++ b/vendor/github.com/go-playground/validator/v10/baked_in.go @@ -1295,8 +1295,13 @@ func isEq(fl FieldLevel) bool { return field.Uint() == p - case reflect.Float32, reflect.Float64: - p := asFloat(param) + case reflect.Float32: + p := asFloat32(param) + + return field.Float() == p + + case reflect.Float64: + p := asFloat64(param) return field.Float() == p @@ -1760,8 +1765,11 @@ func requireCheckFieldValue( case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: return field.Uint() == asUint(value) - case reflect.Float32, reflect.Float64: - return field.Float() == asFloat(value) + case reflect.Float32: + return field.Float() == asFloat32(value) + + case reflect.Float64: + return field.Float() == asFloat64(value) case reflect.Slice, reflect.Map, reflect.Array: return int64(field.Len()) == asInt(value) @@ -2060,8 +2068,13 @@ func isGte(fl FieldLevel) bool { return field.Uint() >= p - case reflect.Float32, reflect.Float64: - p := asFloat(param) + case reflect.Float32: + p := asFloat32(param) + + return field.Float() >= p + + case reflect.Float64: + p := asFloat64(param) return field.Float() >= p @@ -2106,10 +2119,16 @@ func isGt(fl FieldLevel) bool { return field.Uint() > p - case reflect.Float32, reflect.Float64: - p := asFloat(param) + case reflect.Float32: + p := asFloat32(param) return field.Float() > p + + case reflect.Float64: + p := asFloat64(param) + + return field.Float() > p + case reflect.Struct: if field.Type().ConvertibleTo(timeType) { @@ -2148,8 +2167,13 @@ func hasLengthOf(fl FieldLevel) bool { return field.Uint() == p - case reflect.Float32, reflect.Float64: - p := asFloat(param) + case reflect.Float32: + p := asFloat32(param) + + return field.Float() == p + + case reflect.Float64: + p := asFloat64(param) return field.Float() == p } @@ -2281,8 +2305,13 @@ func isLte(fl FieldLevel) bool { return field.Uint() <= p - case reflect.Float32, reflect.Float64: - p := asFloat(param) + case reflect.Float32: + p := asFloat32(param) + + return field.Float() <= p + + case reflect.Float64: + p := asFloat64(param) return field.Float() <= p @@ -2327,8 +2356,13 @@ func isLt(fl FieldLevel) bool { return field.Uint() < p - case reflect.Float32, reflect.Float64: - p := asFloat(param) + case reflect.Float32: + p := asFloat32(param) + + return field.Float() < p + + case reflect.Float64: + p := asFloat64(param) return field.Float() < p diff --git a/vendor/github.com/go-playground/validator/v10/util.go b/vendor/github.com/go-playground/validator/v10/util.go index b81d9543..084d4617 100644 --- a/vendor/github.com/go-playground/validator/v10/util.go +++ b/vendor/github.com/go-playground/validator/v10/util.go @@ -261,13 +261,19 @@ func asUint(param string) uint64 { return i } -// asFloat returns the parameter as a float64 +// asFloat64 returns the parameter as a float64 // or panics if it can't convert -func asFloat(param string) float64 { - +func asFloat64(param string) float64 { i, err := strconv.ParseFloat(param, 64) panicIf(err) + return i +} +// asFloat64 returns the parameter as a float64 +// or panics if it can't convert +func asFloat32(param string) float64 { + i, err := strconv.ParseFloat(param, 32) + panicIf(err) return i } diff --git a/vendor/modules.txt b/vendor/modules.txt index 4671391d..c7fc653d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -32,7 +32,7 @@ github.com/go-playground/locales/currency # github.com/go-playground/universal-translator v0.18.1 ## explicit; go 1.18 github.com/go-playground/universal-translator -# github.com/go-playground/validator/v10 v10.15.0 +# github.com/go-playground/validator/v10 v10.15.1 ## explicit; go 1.18 github.com/go-playground/validator/v10 # github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 @@ -184,7 +184,7 @@ github.com/pierrec/lz4/v4/internal/xxh32 # github.com/pivotal-cf/brokerapi/v10 v10.0.0 ## explicit; go 1.19 github.com/pivotal-cf/brokerapi/v10/domain -# github.com/pivotal-cf/on-demand-services-sdk v0.43.3-0.20230816125140-809e62e8b09b +# github.com/pivotal-cf/on-demand-services-sdk v0.43.3-0.20230818121449-a0ae6e213dcf ## explicit; go 1.20 github.com/pivotal-cf/on-demand-services-sdk/bosh github.com/pivotal-cf/on-demand-services-sdk/serviceadapter