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 depth option for "file"command #18

Open
lcc opened this issue Aug 17, 2022 · 2 comments
Open

Add depth option for "file"command #18

lcc opened this issue Aug 17, 2022 · 2 comments

Comments

@lcc
Copy link

lcc commented Aug 17, 2022

When generating a graph for a file it would be nice to have an option to specify a depth for dependencies. A pratical example would be in a file blahblah.go I have a struct A that has a struct B as a property. When generating the diagram for blahblah.go it would be awesome to be able to specify a depth that followed A properties to a certain depth.
The following command:
go-plantuml generate -f model/blahblah.go --depth=1 -o graph.puml
would then generate a puml file of both blahblah.go as well as of the first level dependencies of A.

Another example would be if depth is 2, it would mean that if B had a dependency C we should be able to request issue go-plantuml generate -f model/blahblah.go --depth=2 -o graph.puml and see the relationships of A, B and C.

@lcc lcc changed the title Add depth option for "file Add depth option for "file"command Aug 17, 2022
@lcc
Copy link
Author

lcc commented Aug 17, 2022

IMO this would be super useful for really big projects where the directory recursive generation is not really an option (graphs are too big).

@bykof
Copy link
Owner

bykof commented Aug 23, 2022

Hi thank you for your request!
Currently I have not the resources to implement this feature. Actually this can be really handy, but you can also do the same stuff by using the -f attribute like:

go-plantuml generate -f model/blahblah.go -f model/a.go -o graph.puml

I know this isn't as cool as using the --depth feature, but maybe it can solve your problem directly ^^

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

2 participants