godepgraph

A Go dependency graph visualization tool

  • 所有者: kisielk/godepgraph
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

godepgraph

godepgraph is a program for generating a dependency graph of Go packages.

Build Status

Install

go get github.com/kisielk/godepgraph

Use

For basic usage, just give the package path of interest as the first
argument:

godepgraph github.com/kisielk/godepgraph

The output is a graph in Graphviz dot format. If you have the
graphviz tools installed you can render it by piping the output to dot:

godepgraph github.com/kisielk/godepgraph, dot -Tpng -o godepgraph.png

By default godepgraph will display packages in the standard library in the
graph, though it will not delve in to their dependencies.

Colors

godepgraph uses a simple color scheme to denote different types of packages:

  • green: a package that is part of the Go standard library, installed in $GOROOT.
  • blue: a regular Go package found in $GOPATH.
  • yellow: a vendored Go package found in $GOPATH.
  • orange: a package found in $GOPATH that uses cgo by importing the special package "C".

Ignoring Imports

The Go Standard Library

If you want to ignore standard library packages entirely, use the -s flag:

godepgraph -s github.com/kisielk/godepgraph

Vendored Libraries

If you want to ignore vendored packages entirely, use the -novendor flag:

godepgraph -novendor github.com/something/else

By Name

Import paths can be ignored in a comma-separated list passed to the -i flag:

godepgraph -i github.com/foo/bar,github.com/baz/blah github.com/something/else

The packages and their imports will be excluded from the graph, unless the imports
are also imported by another package which is not excluded.

By Prefix

Import paths can also be ignored by prefix. The -p flag takes a comma-separated
list of prefixes:

godepgraph -p github.com,launchpad.net bitbucket.org/foo/bar

Example

Here's some example output for a component of Gary Burd's gopkgdoc project:

Example output

主要指标

概览
名称与所有者kisielk/godepgraph
主编程语言Go
编程语言Go (语言数: 1)
平台
许可证MIT License
所有者活动
创建于2013-02-13 22:29:38
推送于2025-06-24 16:17:42
最后一次提交2025-06-24 09:15:02
发布数1
最新版本名称v1.0.0 (发布于 )
第一版名称v1.0.0 (发布于 )
用户参与
星数1.1k
关注者数13
派生数95
提交数69
已启用问题?
问题数25
打开的问题数10
拉请求数22
打开的拉请求数2
关闭的拉请求数5
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?