依赖树查看

查看依赖树

一、gmchar

GitHub - PaulXu-cn/go-mod-graph-chart: Draw graphs through GO MOD GRAPH output

使用方法:

1
2
$ go install github.com/PaulXu-cn/go-mod-graph-chart/gmchart@latest
$ go mod graph | gmchart

依赖多时,显示不友好。

二、deptree[ 推荐 ]

GitHub - vc60er/deptree: show golang dependence like tree

使用方法:

1
2
$ go install github.com/vc60er/deptree@latest
$ go mod graph | deptree -d 3 | grep "关键词"

使用grep,即使依赖很多,也很容易过滤出关心的依赖。

评论