argouml-tigris-org / argouml

Main project of argouml. Some information in the wiki. Some old releases in releases. (depends on parentpom, testmodels)
246 stars 92 forks source link

Add Golang support #66

Open daniel-santos opened 1 year ago

daniel-santos commented 1 year ago

Hello. Go is a horrible language. But I somehow find myself needing to build a large and complex project in Go and I miss my UML tools.

I hacked up goplantuml (to fix bugs and such), but I still can't get any UML editors to import my model, even with plantuml -v -xmi:argo (classes aren't in their respective packages and the model gets screwed). I suppose that would be a separate issue, but I just want to ask about Go support. At the very minimum, having the Go primitives would be helpful.

These are the basic type "Kinds" and my hacked-up goplantuml works with Go's abstract syntax tree, which gives you the parsed syntax, but doesn't resolve any symbols. Amongst the Kinds, Bool through Complex128, (perhaps Array and Func?), Pointer, and UnsafePointer are the actual primitives and the rest are composite types. Slice and Map can probably be represented by a built-in template type.

Anyway, any pointers on at least setting up language support for Go to the extent of having the primitives? Thank you!

EDIT: Aww, it looks like ArgoUML lacks support for multiple return values -- is that correct?

linustolke commented 1 year ago

The model used in argouml is very old. I don't think it updated to UML2.0. That is probaby the source of such lackings but I am not sure of the details.

If you have some specific adaptations to argouml for go, we should keep them in an argouml-go repo. Do you want me to set this up?