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

Not an issue per se #1

Closed
pitakill opened this issue Feb 19, 2019 · 2 comments
Closed

Not an issue per se #1

pitakill opened this issue Feb 19, 2019 · 2 comments

Comments

@pitakill
Copy link

Nice piece of software you have here!

I've got a doubt about if is possible to have methods on the dynamic structs built with this library. Or in other words, if the dynamic structs can implement a interface

Some light about it will be awesome

@Ompluscator
Copy link
Owner

Thx!
I'm not completely sure about about interface implementation, but I had some thoughts to work on that, maybe even in next version :)

@Ompluscator
Copy link
Owner

I've tried many different approaches. Last one was by trying to attach anonymous field which implements some interface. Unfortunately, right now thats not possible: golang/go#23063

For now, I would suggest usage of ToStruct method from reader - it would be possible to map complete dynamic struct to some struct, which than implements some interface.

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

No branches or pull requests

2 participants