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

core: Always initialize extra #9

Merged
merged 1 commit into from Dec 17, 2019
Merged

core: Always initialize extra #9

merged 1 commit into from Dec 17, 2019

Conversation

lstoll
Copy link

@lstoll lstoll commented Dec 12, 2019

Go handles empty maps poorly, so make prefill initialize it. It will be omitted
from the JSON if nothing is added to it.

Go handles empty maps poorly, so make prefill initialize it. It will be omitted
from the JSON if nothing is added to it.
@lstoll lstoll requested a review from a team December 12, 2019 17:56
@lstoll lstoll changed the title core: Alawys initialize extra core: Always initialize extra Dec 13, 2019
@lstoll
Copy link
Author

lstoll commented Dec 13, 2019

@alindeman do you have any thoughts on this vs. http.Header style custom type with Get/Set methods that handle this better?

@alindeman
Copy link
Contributor

@alindeman do you have any thoughts on this vs. http.Header style custom type with Get/Set methods that handle this better?

I don't have a strong preference. As far as I can tell, even http.Header needs to be initialized.

@lstoll lstoll merged commit 401b005 into master Dec 17, 2019
@lstoll lstoll deleted the lstoll-init-extra branch December 17, 2019 16:03
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.

None yet

3 participants