Open tombenke opened 3 years ago
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.
Merging #111 (c0fda4d) into master (2adf2cf) will not change coverage. The diff coverage is
100.00%
.:exclamation: Current head c0fda4d differs from pull request most recent head 13c6c11. Consider uploading reports for the commit 13c6c11 to get more accurate results
@@ Coverage Diff @@
## master #111 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 5 5
Lines 625 510 -115
==========================================
- Hits 625 510 -115
Impacted Files | Coverage Δ | |
---|---|---|
parser/class_parser.go | 100.00% <100.00%> (ø) |
|
parser/alias.go | 100.00% <0.00%> (ø) |
|
parser/field.go | 100.00% <0.00%> (ø) |
|
parser/struct.go | 100.00% <0.00%> (ø) |
|
parser/function.go | 100.00% <0.00%> (ø) |
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. Anyway, what about using GitHub actions instead of Travis?
Dear Javier,
1. 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.
[…]
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