Thanks to visit codestin.com
Credit goes to github.com

Skip to content

jybp/gopkgraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gopkgraph

⚠️ This is experimental, performance may be slow.

A simple tool to generate a dependency graph of Golang packages. The output has the same format as the go mod graph command. It can be used alongside tools that support that format such as modgraphviz.

imports dependency tree

Installation

$ go install github.com/jybp/gopkgraph@latest

Usage

List all dependencies of the package in the current directory belonging to the same module:

$ gopkgraph | modgraphviz | dot -Tpng -o pkgs.png

List all dependencies of the package in the current directory including one level of dependencies from other modules belonging to github.com/user:

$ gopkgraph -mods=1 | grep " \github.com/user" | modgraphviz | dot -Tpng -o pkgs.png

Flags

       Flag       Description
-pkg Path to the package. Omit this flag to target the current directory. (optional)
-mods Max depth for packages from other modules. (optional)
-stdlib Max depth for packages from the stdlib. (optional)
-trim Trim module prefix. (optional)
-help Print flags. (optional)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages