Allow *any when using UnmarshalPlist()#46
Conversation
|
Thanks for the PR @mikeschinkel (and for adding the test case!). I've done some experimentation with this change and confirmed it doesn't change any functionality (other than allowing the new functionality instead of returning an error). |
|
@korylprince — Thank you! You are the best! 😊 |
|
@mikeschinkel thanks for the PR! Would you mind revising the test data to be more simplified plist (that's only large enough to display the issue)? For clarity I'd hope to keep it as tiny as possible. Then we can get this merged. Thanks! |
|
@jessepeterson — I have since had to task switch to a different project. As my head isn't in this use-case at the moment I'll wait to follow up once I am back again working on my prefsctl project. |
|
@jessepeterson I implemented a minimal test for this PR, if you can take a look. |
jessepeterson
left a comment
There was a problem hiding this comment.
lgtm! thanks @mikeschinkel and @korylprince
This PR addresses the use-case discussed on the MacAdmins Slack forum with @korylprince and @jessepeterson.
Basically when a struct property is of type
*CustomTypeit was not possible to unmarshal to that type. The fix was suggested by @korylprince which I implemented and tested for my use-case and it appears to work.I also added a test case name
TestValueForDecodeWithDict, and it as well as all other test pass.