Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Marshaler support for slices of interfaces. #75

Closed
wants to merge 2 commits into from

Conversation

grahammiln
Copy link
Contributor

Support encoding of general interfaces slices,[]interface{}, and slices of constrained interfaces.

Expand supported types that can be encoded to include slices of general interfaces, `[]interface{}` and constrained interfaces.
@DHowett
Copy link
Owner

DHowett commented Jan 30, 2023

Thanks! As with your prior PR (for which I'm also grateful) I'll need to get to this in a bit. I'm hoping to have some time this week. :)

@DHowett
Copy link
Owner

DHowett commented Dec 27, 2024

I think this may have been fixed by a3baacb!

If I back out your changes in marshal.go, the tests still pass (and produce intact property lists:)

=== RUN   TestInterfaceSliceMarshal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><array><dict><key>Name</key><string>dog</string></dict></array></plist>
--- PASS: TestInterfaceSliceMarshal (0.00s)

=== RUN   TestInterfaceGeneralSliceMarshal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><array><dict><key>Name</key><string>dog</string></dict><string>a string</string><integer>1</integer><true/></array></plist>
--- PASS: TestInterfaceGeneralSliceMarshal (0.00s)

@DHowett
Copy link
Owner

DHowett commented Dec 27, 2024

Thanks for the contributions, of course. Sorry to take ages to get back to you. :)

@DHowett DHowett closed this Dec 27, 2024
DHowett pushed a commit that referenced this pull request Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants