Fix invalid nil interface check on NewRequest - #464
Conversation
Interfaces must be opened in order to check if nil. The issue meant that the JSON marshaler would always output 'null' when a nil interface was passed in to NewRequest.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Description
The nil check when building the request body from the interface in
NewRequestwill always pass, even when the interface is nil.Interfaces must be opened in order to check if nil. The issue meant that the JSON marshaler would always output 'null' when a nil interface was passed in to NewRequest.
Related Issues
Checklist: