Currently, GetHTTPJSONResult modifies a var reference to "return" the data retrieved from the HTTP call. This behavior is not ideal, and may lead to poor maintenance/unexpected behavior in the future. Not to mention that it kills the idiomatic go concept.
Proposed Solution
As a developer, I want to be able to use the GetHTTPJSONResult util in a more predictable/idiomatic way, so that it is more clear/maintainable to use it throughout the other packages
Alternatives / Workarounds
The util is currently working, but it is a bad practice. It could be kept as is, but it is not ideal.
Acceptance Criteria
[x] GetHTTPJSONResult Returns JSON data, or an error
[x] JSON data returned must be assignable to struct-typed variables
[x] GO strong type must work
[x] Returned data must be manipulable
[x] All packages that make use of the util must be refactored to accommodate the changes
[x] Adjust the docs to reflect changes
Additional Context
N/A
References
N/A
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Upvote & Fund
We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.
Description
Currently,
GetHTTPJSONResult
modifies avar
reference to "return" the data retrieved from the HTTP call. This behavior is not ideal, and may lead to poor maintenance/unexpected behavior in the future. Not to mention that it kills the idiomatic go concept.Proposed Solution
As a developer, I want to be able to use the
GetHTTPJSONResult
util in a more predictable/idiomatic way, so that it is more clear/maintainable to use it throughout the other packagesAlternatives / Workarounds
The util is currently working, but it is a bad practice. It could be kept as is, but it is not ideal.
Acceptance Criteria
GetHTTPJSONResult
Returns JSON data, or an errorAdditional Context
N/A
References
N/A
Code of Conduct
Upvote & Fund