-
Notifications
You must be signed in to change notification settings - Fork 178
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
Some changes in connections #111
base: master
Are you sure you want to change the base?
Conversation
Change 'implements' connection from <|-- to <|.. Add go.mod file to the repo
Thanks, @tombenke for your suggestion. Let me take a look at this to see how it changes the definitions. In any case, this PR is failing tests because it changes how relations are rendered. If I ultimately agree with you on this change, we need to have a PR that does not break the testing of the packages. |
Codecov Report
@@ Coverage Diff @@
## master #111 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 5 5
Lines 625 510 -115
==========================================
- Hits 625 510 -115
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Sorry, I forgot to change the test cases, now I have fixed them, hopefully I made it well. |
[…] Sorry, but I have to disagree. Inheritance has something to do with the substitution principle, i.e. everywhere where a baseclass is required a derived class can be passed. For Go struct + embedding this is simply not the case. IMHO Go only has interface inheritance, i.e. embedding of interfaces – and that's it. Embedding of struct only is some syntactical sugar that makes addressing of fields somewhat less verbose. But I don't see a real correspondence to UML concepts. |
Dear Javier,
I think the counterpart of inheritance in golang is the embedding of structures, so in case of the extends relation the current connection is not correct in my opinion. Either the
*--
should point to the opposite direction or it's even better to use the<|--
relation instead.In case of interfaces the
implements
relation should be noted with the dotted line, instead of the solid one.So, I would like to kindly ask you to accept and approve these two changes in the generated notations:
I also added a go.mod file to the repo:
Best Regards,
Tamás Benke