Skip to content
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
merged 1 commit into from
Aug 2, 2019
Merged

getSingleImpl: don't check whether a map value is zero #4

merged 1 commit into from
Aug 2, 2019

Conversation

ianlancetaylor
Copy link
Contributor

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 iant@golang.org

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 <iant@golang.org>
@codecov
Copy link

codecov bot commented Aug 2, 2019

Codecov Report

Merging #4 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master       #4   +/-   ##
=======================================
  Coverage   78.02%   78.02%           
=======================================
  Files           1        1           
  Lines         182      182           
=======================================
  Hits          142      142           
  Misses         24       24           
  Partials       16       16
Impacted Files Coverage Δ
pointer.go 78.02% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a105a90...de6c4fe. Read the comment docs.

@casualjim casualjim merged commit a67b0cd into go-openapi:master Aug 2, 2019
@ianlancetaylor
Copy link
Contributor Author

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 <kolyshkin@gmail.com>
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 <kolyshkin@gmail.com>
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 <kolyshkin@gmail.com>
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 <kolyshkin@gmail.com>
Signed-off-by: zach <Zachary.Joyner@linux.com>
@aastein aastein mentioned this pull request Oct 22, 2019
3 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 <kolyshkin@gmail.com>
(cherry picked from commit 93f9b90)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 <kolyshkin@gmail.com>
(cherry picked from commit 93f9b90)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 <kolyshkin@gmail.com>
(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 <kolyshkin@gmail.com>
(cherry picked from commit 93f9b90)
Signed-off-by: Robert Günzler <robertg@balena.io>
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 <github@gone.nl>
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 <github@gone.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test failure under Go 1.13
2 participants