Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Fix /find empty response resulting in "null" #1464

Merged
merged 3 commits into from
Sep 19, 2019
Merged

Fix /find empty response resulting in "null" #1464

merged 3 commits into from
Sep 19, 2019

Conversation

Dieterbe
Copy link
Contributor

@Dieterbe Dieterbe commented Sep 18, 2019

I found this useful to play with: https://play.golang.org/p/4ri3jpvrAZy

@Dieterbe Dieterbe changed the title Fix 1463 Fix /find empty response resulting in "null" Sep 18, 2019
@Dieterbe Dieterbe changed the title Fix /find empty response resulting in "null" [WIP] Fix /find empty response resulting in "null" Sep 18, 2019
new leaves the value nil, which makes the go encoder encode is as "null"
if we explicitly allocate it, the go encoder will automatically encode
it as "[]"

See golang/go#26866
@Dieterbe Dieterbe changed the title [WIP] Fix /find empty response resulting in "null" Fix /find empty response resulting in "null" Sep 18, 2019
Copy link
Member

@woodsaj woodsaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@Dieterbe Dieterbe merged commit 7a539fb into master Sep 19, 2019
@Dieterbe Dieterbe deleted the fix-1463 branch September 19, 2019 07:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants