-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
node/bindnode: improve support for pointer types
In particular, write an extensive test that exercises all the edge cases we care about: 1) Each schema type, and its corresponding Go type (including multiple Go types where appropriate, e.g. links) 2) Each modifier: none, "optional", and "nullable" 3) Each data to decode: present, missing (absent), null The fix is to dereference or initialize pointers as needed. Some more edge cases remain, such as other schema types and non-default representation strategies; a TODO tracks those. While here, we improve the errors returned by AssignLink, so that it now reports a bindnode-specific error when the schema type is a Link but we can't assign to the Go value.
- Loading branch information
Showing
4 changed files
with
184 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.