From 00524bbd8c3e403245a80dbcf13d62da79f1c03f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 22:36:16 +0000 Subject: [PATCH] Bump github.com/go-test/deep from 1.1.0 to 1.1.1 Bumps [github.com/go-test/deep](https://github.com/go-test/deep) from 1.1.0 to 1.1.1. - [Release notes](https://github.com/go-test/deep/releases) - [Changelog](https://github.com/go-test/deep/blob/master/CHANGES.md) - [Commits](https://github.com/go-test/deep/compare/v1.1.0...v1.1.1) --- updated-dependencies: - dependency-name: github.com/go-test/deep dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- vendor/github.com/go-test/deep/CHANGES.md | 15 +++++++++++++-- vendor/github.com/go-test/deep/SECURITY.md | 3 ++- vendor/github.com/go-test/deep/deep.go | 9 +++++++++ vendor/modules.txt | 2 +- 6 files changed, 28 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 2a05bee..a92f333 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/AMekss/assert v0.0.0-20211108074654-c2d723ec709d github.com/falzm/golang-ring v0.0.0-20171129155418-0d0f97841b7d github.com/go-numb/go-ftx v0.0.0-20211102085954-3f1fa5e6acc1 - github.com/go-test/deep v1.1.0 + github.com/go-test/deep v1.1.1 github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.0 github.com/jinzhu/copier v0.3.5 diff --git a/go.sum b/go.sum index 61c16c3..0fb5624 100644 --- a/go.sum +++ b/go.sum @@ -25,8 +25,8 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-numb/go-ftx v0.0.0-20211102085954-3f1fa5e6acc1 h1:h6wiAzOZyPqGpM8ozYmzakgSekedK2//3V0VX8xUQW4= github.com/go-numb/go-ftx v0.0.0-20211102085954-3f1fa5e6acc1/go.mod h1:sZs9S1a1GqrO5VBdM4ThWzdY/g/xJ7FPuuNhF7i26LM= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= -github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/go-test/deep v1.1.1 h1:0r/53hagsehfO4bzD2Pgr/+RgHqhmf+k1Bpse2cTu1U= +github.com/go-test/deep v1.1.1/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= diff --git a/vendor/github.com/go-test/deep/CHANGES.md b/vendor/github.com/go-test/deep/CHANGES.md index 98f8c18..163d6d5 100644 --- a/vendor/github.com/go-test/deep/CHANGES.md +++ b/vendor/github.com/go-test/deep/CHANGES.md @@ -1,14 +1,25 @@ # go-test/deep Changelog +## v1.1.1 released 2024-06-23 + +* Added `NilPointersAreZero` option: causes a nil pointer to be equal to a zero value (PR #61) (@seveas) +* Updated test matrix to go1.22, go1.21, and go1.20 + +## v1.1.0 released 2022-12-09 + +* Add optional flags: `Equal(a, b, flags..)` and `FLAG_IGNORE_SLICE_ORDER` (issue #28, PR #56) (@alenkacz) + +--- + ## v1.0.9 released 2022-12-09 * Fixed issue #45: Panic when comparing errors in unexported fields (PR #54) (@seveas) * Fixed issue #46: Functions are handled differently from reflect.DeepEqual (PR #55) (@countcb) -* Updated matrix to go1.17, go1.18, and go1.19 and moved testing to GitHub Actions +* Updated test matrix to go1.17, go1.18, and go1.19 and moved testing to GitHub Actions ## v1.0.8 released 2021-10-13 -* Updated matrix to go1.15, go1.16, and go1.17 +* Updated test matrix to go1.15, go1.16, and go1.17 * Added SECURITY.md and GitHub code analysis ## v1.0.7 released 2020-07-11 diff --git a/vendor/github.com/go-test/deep/SECURITY.md b/vendor/github.com/go-test/deep/SECURITY.md index 845584a..d007137 100644 --- a/vendor/github.com/go-test/deep/SECURITY.md +++ b/vendor/github.com/go-test/deep/SECURITY.md @@ -6,7 +6,8 @@ For security patches, the latest release is supported: | Version | Supported | | ------- | ------------------ | -| 1.0.x | :white_check_mark: | +| 1.1.x | Yes | +| 1.0.x | No | ## Reporting a Vulnerability diff --git a/vendor/github.com/go-test/deep/deep.go b/vendor/github.com/go-test/deep/deep.go index 4aab66a..4be3e1f 100644 --- a/vendor/github.com/go-test/deep/deep.go +++ b/vendor/github.com/go-test/deep/deep.go @@ -43,6 +43,9 @@ var ( // NilMapsAreEmpty causes a nil map to be equal to an empty map. NilMapsAreEmpty = false + + // NilPointersAreZero causes a nil pointer to be equal to a zero value. + NilPointersAreZero = false ) var ( @@ -190,6 +193,12 @@ func (c *cmp) equals(a, b reflect.Value, level int) { if bElem { b = b.Elem() } + if aElem && NilPointersAreZero && !a.IsValid() && b.IsValid() { + a = reflect.Zero(b.Type()) + } + if bElem && NilPointersAreZero && !b.IsValid() && a.IsValid() { + b = reflect.Zero(a.Type()) + } c.equals(a, b, level+1) return } diff --git a/vendor/modules.txt b/vendor/modules.txt index 567951e..92f293b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -30,7 +30,7 @@ github.com/go-numb/go-ftx/rest/private/wallet github.com/go-numb/go-ftx/rest/public/futures github.com/go-numb/go-ftx/rest/public/markets github.com/go-numb/go-ftx/types -# github.com/go-test/deep v1.1.0 +# github.com/go-test/deep v1.1.1 ## explicit; go 1.16 github.com/go-test/deep # github.com/google/go-querystring v1.0.0