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

Add info about embedding interfaces into structs #20

Open
itaranto opened this issue Jan 5, 2023 · 0 comments
Open

Add info about embedding interfaces into structs #20

itaranto opened this issue Jan 5, 2023 · 0 comments

Comments

@itaranto
Copy link

itaranto commented Jan 5, 2023

Currently, only struct on struct or interface on interface embedding is explained in OOP.md.

It would be nice to have an explanation about embedding interfaces into structs.

Here's a nice example:
https://github.com/dapr/components-contrib/blob/master/state/store.go#L51

In this example the DefaultBulkStore struct embeds the Store interface, DefaultBulkStore the uses the embedded Store interface to also implement BulkStore.

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

1 participant