doc: mention how to generate a dependency graph

Thanks @ainghazal for mentioning this useful tool to me!
This commit is contained in:
Simone Basso 2022-06-17 10:56:47 +02:00 committed by GitHub
parent be2da83b1b
commit c3fb7308d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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