Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

json: Handle empty HasPaywall data from News #110

Merged

Conversation

linwoodma
Copy link
Contributor

Came across an error parsing news (hasPaywall) - appearing to be missing data (empty string) for the following symbol:

2022/09/06 00:20:39 fetching news for PLMR
2022/09/06 00:20:39 json: cannot unmarshal string into Go struct field News.hasPaywall of type bool

It's possible that there should be some more extensive input checking, but this small struct tag update may fix the current existing issue. Apologies - this is my first ever fork/PR, but did run the requisite make (lint/int/etc) to

@matthewrankin matthewrankin merged commit 2c9f934 into goinvest:master Jan 23, 2024
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