doc: mention how to generate a dependency graph
Thanks @ainghazal for mentioning this useful tool to me!
This commit is contained in:
parent
be2da83b1b
commit
c3fb7308d8
|
@ -2,14 +2,26 @@
|
||||||
|
|
||||||
This directory contains private Go packages.
|
This directory contains private Go packages.
|
||||||
|
|
||||||
As a reminder, you can always check the Go documentation of
|
## Useful commands
|
||||||
a package by using
|
|
||||||
|
You can read the Go documentation of a package by using `go doc -all`.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
go doc -all ./internal/$package
|
go doc -all ./internal/netxlite
|
||||||
```
|
```
|
||||||
|
|
||||||
where `$package` is the name of the package.
|
You can get a graph of the dependencies using [kisielk/godepgraph](https://github.com/kisielk/godepgraph).
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
godepgraph -s -novendor -p golang.org,gitlab.com ./internal/engine | dot -Tpng -o deps.png
|
||||||
|
```
|
||||||
|
|
||||||
|
You can further tweak which packages to exclude by appending
|
||||||
|
prefixes to the list passed to the `-p` flag.
|
||||||
|
|
||||||
## Tutorials
|
## Tutorials
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user