{"id":22870269,"url":"https://github.com/berquerant/gotypegraph","last_synced_at":"2025-08-19T10:13:49.303Z","repository":{"id":43494386,"uuid":"459634927","full_name":"berquerant/gotypegraph","owner":"berquerant","description":"Generate dependency graph","archived":false,"fork":false,"pushed_at":"2022-07-18T07:53:28.000Z","size":276,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-06T16:57:56.438Z","etag":null,"topics":["go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/berquerant.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}},"created_at":"2022-02-15T15:22:56.000Z","updated_at":"2022-02-15T15:25:05.000Z","dependencies_parsed_at":"2022-08-20T12:10:21.408Z","dependency_job_id":null,"html_url":"https://github.com/berquerant/gotypegraph","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquerant%2Fgotypegraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquerant%2Fgotypegraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquerant%2Fgotypegraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquerant%2Fgotypegraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/berquerant","download_url":"https://codeload.github.com/berquerant/gotypegraph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246460304,"owners_count":20781085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["go"],"created_at":"2024-12-13T13:14:22.086Z","updated_at":"2025-03-31T11:26:09.514Z","avatar_url":"https://github.com/berquerant.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gotypegraph\n\nGenerate definitions and references graph.\n\n## Usage\n\n```\n❯ gotypegraph -h\nUsage of gotypegraph:\n  gotypegraph [flags] -type TYPE patterns...\nFlags:\n  -accept.name string\n        Accept objects whose name matches this.\n  -accept.pkg string\n        Accept packages whose name matches this.\n  -buffer int\n        Size of search buffers. (default 1000)\n  -deny.name string\n        Deny objects whose name matches this.\n  -deny.pkg string\n        Deny packages whose name matches this.\n  -fontsize.max int\n        Max fontsize used for text in dot. (default 24)\n  -fontsize.min int\n        Min fontsize used for text in dot. (default 8)\n  -foreign\n        Search definitions in foreign packages.\n  -log.regexp string\n        Regexp to grep logs.\n  -noselfloop\n        Ignore self references.\n  -penwidth.max int\n        Max penwidth used to draw lines in dot. (default 1)\n  -penwidth.min int\n        Min penwidth used to draw lines in dot. (default 1)\n  -private\n        Search private definitions.\n  -quiet\n        Quiet logs.\n  -stat\n        Generate stat graph when type is dot.\n  -type string\n        Output format. json or dot. (default \"dot\")\n  -universe\n        Search definitions in builtin packages.\n  -v string\n        Logging verbosity. quiet, error, warn, info, verbose or debug. (default \"info\")\n  -weight.max int\n        Max weight for dot. (default 100)\n  -weight.min int\n        Min weight for dot. (default 1)\n  -worker int\n        Number of search workers. (default 4)\n```\n\n## Example\n\nUse graphviz.\n\n``` shell\n❯ gotypegraph ./... \u003e /tmp/example.dot\n❯ dot -Tsvg /tmp/example.dot -o /tmp/example.svg\n```\n\nA gray region is a package.\n\nAn arrow is a dependency, the arrow's tail is the reference and the arrow's head is the definition.  \nThe arrow's label is the count of the same dependency (no label means 1).\n\nA square region in a package is a definition, func, var, etc.  \n`Ref` is the number of times it refers the other definitions.  \n`Def` is the number of times it is referred by the other definitions.  \n`UniqRef` is the unique `Ref`, `UniqRef` is the unique `Def`.  \n`RefDef` is `Ref + Def`.\n\nEmphasized arrows and definitions have many dependencies.\n\nOn mouseover, an arrow and a definition displays additional information,  \nan arrow displays the tail and the head, a definition displays dependencies in lines.\n\nGenerate graph with `-stat`:\n\n``` shell\n❯ gotypegraph -stat ./... \u003e /tmp/example_stat.dot\n❯ dot -Tsvg /tmp/example_stat.dot -o /tmp/example_stat.svg\n```\n\nThe graph displays dependencies aggregated by package.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberquerant%2Fgotypegraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberquerant%2Fgotypegraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberquerant%2Fgotypegraph/lists"}