godepgraph
godepgraph copied to clipboard
How to show only the dependencies of one module?
Hi Kamil, thank you for that tool!
I want to see the package dependency inside one module.
I want to ignore other dependencies (like stdlib or external packages).
Is there a way to get this?
Hey @guettli, this might be a bit late (almost 10 months), but I had the same usecase (I think) and here was my approach:
# Assuming the module is github.com/my/project
# Assuming we have cd-ed into the project
# Assuming the project entrypoint is ./cmd/main.go
godepgraph -s -o github.com/my/project,command-line-arguments cmd/main.go
You need to use the o flag to only show items with a particular prefix. But, you must use the prefix "command-line-arguments" to include your entrypoint.