4 ms·
>slicing structs Can you explain what this means? Still learning Go. Google didn't help.
by akyu 7y ago
>slicing structs
Can you explain what this means? Still learning Go. Google didn't help.
- codr7 7y agoI'll try :) The issue is that you can't interface methods from pointers to a contained struct, since it has no idea where it is or how it got there. Instead a pointer to the full struct needs to be threaded all the way down to where the overridden function is called. I sort of understand why, but this is a major missing piece that makes it very frustrating to add anything but trivial default implementations to interfaces in Go from my experience.