{"id":13612918,"url":"https://github.com/zoroqi/dependency-graph","last_synced_at":"2026-01-14T22:16:32.916Z","repository":{"id":43845349,"uuid":"271931904","full_name":"zoroqi/dependency-graph","owner":"zoroqi","description":"Visualize Go Dependency Trees","archived":false,"fork":false,"pushed_at":"2024-01-19T07:10:40.000Z","size":66,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-07T21:41:26.067Z","etag":null,"topics":["dependency-tree","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zoroqi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-06-13T03:16:01.000Z","updated_at":"2022-08-17T12:16:23.000Z","dependencies_parsed_at":"2024-01-19T09:05:57.254Z","dependency_job_id":"08f2baa5-265f-46e4-94a8-09d619586826","html_url":"https://github.com/zoroqi/dependency-graph","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/zoroqi/dependency-graph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoroqi%2Fdependency-graph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoroqi%2Fdependency-graph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoroqi%2Fdependency-graph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoroqi%2Fdependency-graph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoroqi","download_url":"https://codeload.github.com/zoroqi/dependency-graph/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoroqi%2Fdependency-graph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28436268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T21:32:52.117Z","status":"ssl_error","status_checked_at":"2026-01-14T21:32:33.442Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dependency-tree","go","golang"],"created_at":"2024-08-01T20:00:36.527Z","updated_at":"2026-01-14T22:16:32.897Z","avatar_url":"https://github.com/zoroqi.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# dependency graph\n\n树形打印`go mod graph`\n\n\n## 安装\n\n```\ngo get -v -u github.com/zoroqi/dependency-graph\n\ncd ${YOUR PROJECT PATH}\n\ndependency-graph\n```\n\n## 使用\n\n```\n  -ex value\n    \texclude package, 排除部分包, 可以多个 -ex xxx -ex yyy\n  -expre value\n    \texclude package, prefix match, 排除部分包前缀匹配, 可以多个 -expre xxx -expre yyy\n  -l int\n    \tmax level 最大打印深度\n  -list\n    \tfilter the package in the 'list -m all' result, 基于 `list -m all` 进行过滤\n  -p string\n    \tdefault: tree print\n    \trl: reverse line print\n    \trt: reverse tree print\n    \twt: whole tree print\n    \tdot: graphviz print, `xxx | dot -Tsvg -o test.svg` \n  -s string\n    \tsearch pkg name, 检索特定的包\n```\n\n打印\n* default\n```\n a\n |-b\n | |-c\n |-d\n   |-e\n```\n* rl\n```\nc -\u003e b -\u003e a\ne -\u003e d -\u003e a\n```\n* rt\n```\n c\n |-b\n   |-a\n\n e\n |-d\n   |-a\n```\n* wt\n```\n a\n |-b\n   |-c\n\n a\n |-d\n   |-e\n```\n* dot\n```\ndigraph godeps {\n0 [label=\"a\" style=\"filled\"]\n1 [label=\"b\" style=\"filled\"]\n0 -\u003e 1\n}\n```\n\n## 一些新知识\n\n`go mod graph` 可以查看依赖关系\n\n`go list -m all` 查看准确依赖版本, 并不完全准确.\n\n`go list -m -u -json all` 依赖详细信息\n\n`go mod why -m all` 查看依赖路径\n\n`go mod why -m github.com/xxx/xxx` 指定package依赖路径\n\n`incompatible`代表包没有按照golang的规范进行版本管理 [挺好的文档](https://github.com/RainbowMango/GoExpertProgramming)\n \n```\ngithub.com/xxx/xxx@v2.0.0 就是不规范的 \ngithub.com/xxx/xxx/v2@v2.0.0 就是合规的\ngithub.com/xxx/xxx.v2@v2.0.0 就是合规的\n```\n\n[测试项目snake](https://github.com/1024casts/snake), 代码不多依赖不少. 特别声明, 尽量设置打印层数.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoroqi%2Fdependency-graph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoroqi%2Fdependency-graph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoroqi%2Fdependency-graph/lists"}