DepGraph is a package to figure out an efficient dependency tree for a Go package.
The dependency graph is built by inspecting file imports only, which is faster than go list
, or AST parsing.
It can be used to figure out why a particular package is imported into a service.
Examples
- Why is
modulename/currency
imported inmodulename/services/fe
?
depgraph modulename/services/fe modulename/currency
modulename/services/fe
└── modulename/locale/allstrings
└── modulename/locale
└── modulename/currency
- Which apps is
modulename/services/withdrawals/ops
imported in?
depgraph modulename/services/withdrawals/ops
modulename/services/fe/website/modulename_website
└── modulename/services/fe/website
└── modulename/services/fe/api/base
└── modulename/services/withdrawals/ops/send
└── modulename/services/withdrawals/ops
modulename/services/withdrawals/withdrawals
└── modulename/services/withdrawals/state
└── modulename/services/withdrawals/client/logical
└── modulename/services/withdrawals/ops