-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getSingleImpl: don't check whether a map value is zero #4
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The code that checked whether a map value is zero was wrong. It passed the reflect.Value itself, which before Go 1.13 was never zero. In Go 1.13 this changed, as reflect.Value got an IsZero method, which reports whether the value stored in the reflect.Value is zero. Checking that causes tests in go-openapi/spec to fail. Fixes go-openapi/spec#99 Signed-off-by: Ian Lance Taylor <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #4 +/- ##
=======================================
Coverage 78.02% 78.02%
=======================================
Files 1 1
Lines 182 182
=======================================
Hits 142 142
Misses 24 24
Partials 16 16
Continue to review full report at Codecov.
|
casualjim
approved these changes
Aug 2, 2019
Thanks. |
kolyshkin
added a commit
to kolyshkin/go-swagger
that referenced
this pull request
Oct 4, 2019
Taken from go-openapi/jsonpointer#4 Should fix the following go-swagger panic: > panic: object has no key "default" Signed-off-by: Kir Kolyshkin <[email protected]>
This was referenced Oct 4, 2019
kolyshkin
added a commit
to kolyshkin/moby
that referenced
this pull request
Oct 8, 2019
This is an attempt to fix go-swagger panic under Golang 1.13. Details: * go-openapi/jsonpointer#4 * go-swagger/go-swagger#2059 Signed-off-by: Kir Kolyshkin <[email protected]>
docker-jenkins
pushed a commit
to docker-archive/docker-ce
that referenced
this pull request
Oct 10, 2019
This is an attempt to fix go-swagger panic under Golang 1.13. Details: * go-openapi/jsonpointer#4 * go-swagger/go-swagger#2059 Signed-off-by: Kir Kolyshkin <[email protected]> Upstream-commit: 93f9b902af89f82367d750aa871d40f25ccd99ca Component: engine
burnMyDread
pushed a commit
to burnMyDread/moby
that referenced
this pull request
Oct 21, 2019
This is an attempt to fix go-swagger panic under Golang 1.13. Details: * go-openapi/jsonpointer#4 * go-swagger/go-swagger#2059 Signed-off-by: Kir Kolyshkin <[email protected]> Signed-off-by: zach <[email protected]>
9 tasks
thaJeztah
pushed a commit
to thaJeztah/docker
that referenced
this pull request
Feb 22, 2020
This is an attempt to fix go-swagger panic under Golang 1.13. Details: * go-openapi/jsonpointer#4 * go-swagger/go-swagger#2059 Signed-off-by: Kir Kolyshkin <[email protected]> (cherry picked from commit 93f9b90) Signed-off-by: Sebastiaan van Stijn <[email protected]>
thaJeztah
pushed a commit
to thaJeztah/docker
that referenced
this pull request
Mar 12, 2020
This is an attempt to fix go-swagger panic under Golang 1.13. Details: * go-openapi/jsonpointer#4 * go-swagger/go-swagger#2059 Signed-off-by: Kir Kolyshkin <[email protected]> (cherry picked from commit 93f9b90) Signed-off-by: Sebastiaan van Stijn <[email protected]>
robertgzr
pushed a commit
to balena-os/balena-engine
that referenced
this pull request
May 18, 2021
This is an attempt to fix go-swagger panic under Golang 1.13. Details: * go-openapi/jsonpointer#4 * go-swagger/go-swagger#2059 Signed-off-by: Kir Kolyshkin <[email protected]> (cherry picked from commit 93f9b90)
robertgzr
pushed a commit
to balena-os/balena-engine
that referenced
this pull request
May 18, 2021
This is an attempt to fix go-swagger panic under Golang 1.13. Details: * go-openapi/jsonpointer#4 * go-swagger/go-swagger#2059 Signed-off-by: Kir Kolyshkin <[email protected]> (cherry picked from commit 93f9b90) Signed-off-by: Robert Günzler <[email protected]>
thaJeztah
added a commit
to thaJeztah/go-swagger
that referenced
this pull request
Jul 2, 2021
This converts the vendor/manifest JSON to a vendor.conf, to be used with vndr (for now, avoiding adding a go.mod and using go mod vendor) Note that the vendored version of upstream is missing commit 5793aa6 however, go-openapi/jsonpointer#4 has this change, so we can possibly forward to a newer version. WARNING: package github.com/armon/consul-api is unused, consider removing it from vendor.conf WARNING: package github.com/coreos/go-etcd is unused, consider removing it from vendor.conf WARNING: package github.com/naoina/denco is unused, consider removing it from vendor.conf WARNING: package github.com/opennota/urlesc is unused, consider removing it from vendor.conf WARNING: package github.com/ugorji/go is unused, consider removing it from vendor.conf WARNING: package github.com/willf/bitset is unused, consider removing it from vendor.conf WARNING: package github.com/xordataexchange/crypt is unused, consider removing it from vendor.conf Signed-off-by: Sebastiaan van Stijn <[email protected]>
thaJeztah
added a commit
to thaJeztah/go-swagger
that referenced
this pull request
Jul 3, 2021
This converts the vendor/manifest JSON to a vendor.conf, to be used with vndr (for now, avoiding adding a go.mod and using go mod vendor) Note that the vendored version of upstream is missing commit 5793aa6 however, go-openapi/jsonpointer#4 has this change, so we can possibly forward to a newer version. WARNING: package github.com/armon/consul-api is unused, consider removing it from vendor.conf WARNING: package github.com/coreos/go-etcd is unused, consider removing it from vendor.conf WARNING: package github.com/naoina/denco is unused, consider removing it from vendor.conf WARNING: package github.com/opennota/urlesc is unused, consider removing it from vendor.conf WARNING: package github.com/ugorji/go is unused, consider removing it from vendor.conf WARNING: package github.com/willf/bitset is unused, consider removing it from vendor.conf WARNING: package github.com/xordataexchange/crypt is unused, consider removing it from vendor.conf Signed-off-by: Sebastiaan van Stijn <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The code that checked whether a map value is zero was wrong.
It passed the reflect.Value itself, which before Go 1.13 was never zero.
In Go 1.13 this changed, as reflect.Value got an IsZero method,
which reports whether the value stored in the reflect.Value is zero.
Checking that causes tests in go-openapi/spec to fail.
Fixes go-openapi/spec#99
Signed-off-by: Ian Lance Taylor [email protected]