3 ms·
Disclaimer: Not a regular Go user. I was thinking of how you can embed types in structs. You automatically dereference the fields and methods of the components
by dgb23 5y ago
Disclaimer: Not a regular Go user.
I was thinking of how you can embed types in structs. You automatically dereference the fields and methods of the components directly from the outside.
- BobbyJo 5y agoYep, in go the inheritance (using the term loosely) structure can apply to interfaces (which specify groups of functions) and structs (which specify groups of data) and roughly does the same thing in both instances.