{"id":13492636,"url":"https://github.com/ondrajz/go-callvis","last_synced_at":"2026-01-12T02:39:39.487Z","repository":{"id":37306445,"uuid":"67286820","full_name":"ondrajz/go-callvis","owner":"ondrajz","description":"Visualize call graph of a Go program using Graphviz","archived":false,"fork":false,"pushed_at":"2025-01-04T18:11:32.000Z","size":6894,"stargazers_count":6204,"open_issues_count":69,"forks_count":432,"subscribers_count":75,"default_branch":"master","last_synced_at":"2025-04-23T20:59:08.650Z","etag":null,"topics":["awesome-go","callgraph","golang","golang-tools","graphviz","static-analysis","visualization"],"latest_commit_sha":null,"homepage":"https://ondrajz.github.io/go-callvis/","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/ondrajz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"publiccode":null,"codemeta":null},"funding":{"patreon":"ondrajz","open_collective":"go-callvis"}},"created_at":"2016-09-03T11:31:46.000Z","updated_at":"2025-04-23T07:08:53.000Z","dependencies_parsed_at":"2023-12-25T21:44:13.059Z","dependency_job_id":"d7809c5e-0c92-4344-a890-9ec76c4ce10c","html_url":"https://github.com/ondrajz/go-callvis","commit_stats":{"total_commits":166,"total_committers":26,"mean_commits":6.384615384615385,"dds":0.3493975903614458,"last_synced_commit":"219da1466b0af15cec684973262c82d61184723c"},"previous_names":["truefurby/go-callvis","ondrajz/go-callvis","ofabry/go-callvis"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ondrajz%2Fgo-callvis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ondrajz%2Fgo-callvis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ondrajz%2Fgo-callvis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ondrajz%2Fgo-callvis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ondrajz","download_url":"https://codeload.github.com/ondrajz/go-callvis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250514767,"owners_count":21443208,"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":["awesome-go","callgraph","golang","golang-tools","graphviz","static-analysis","visualization"],"created_at":"2024-07-31T19:01:07.714Z","updated_at":"2026-01-12T02:39:39.480Z","avatar_url":"https://github.com/ondrajz.png","language":"Go","funding_links":["https://patreon.com/ondrajz","https://opencollective.com/go-callvis"],"categories":["Go","Go Tools","others"],"sub_categories":["Search and Analytic Databases"],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"images/gopher.png\" alt=\"gopher\"\u003e\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003ego-callvis\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/ondrajz/go-callvis/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/release/ondrajz/go-callvis.svg?label=latest%20release\u0026logo=github\u0026sort=semver\u0026color=blue\" alt=\"Github release\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/ondrajz/go-callvis/actions\"\u003e\u003cimg src=\"https://github.com/ondrajz/go-callvis/actions/workflows/ci.yml/badge.svg\" alt=\"Build status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/nikolaydubina/go-recipes\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/nikolaydubina/go-recipes/main/badge.svg?raw=true\" alt=\"go-recipes\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://gophers.slack.com/archives/go-callvis\"\u003e\u003cimg src=\"https://img.shields.io/badge/gophers%20slack-%23go--callvis-ff69b4.svg\" alt=\"Slack channel\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003cb\u003ego-callvis\u003c/b\u003e is a development tool to help visualize call graph of a Go program using interactive view.\u003c/p\u003e\n\n---\n\n## Introduction\n\nThe purpose of this tool is to provide developers with a visual overview of a Go program using data from call graph \nand its relations with packages and types. This is especially useful in larger projects where the complexity of \nthe code much higher or when you are just simply trying to understand code of somebody else.\n\n### Features\n\n- click on package to quickly switch the focus using [interactive viewer](#interactive-viewer)\n- focus specific package in the program\n- group functions by package\n- group methods by their receiver type\n- filter packages to specific import path prefixes\n- ignore calls to/from standard library\n- omit various types of function calls\n\n### Output preview\n\n[![main](images/main.png)](images/main.png)\n\n\u003e Check out the [source code](examples/main) for the above image.\n\n### How it works\n\nIt runs [pointer analysis](https://godoc.org/golang.org/x/tools/go/pointer) to construct the call graph of the program and \nuses the data to generate output in [dot format](http://www.graphviz.org/content/dot-language), which can be rendered with Graphviz tools.\n\n## Quick start\n\n### Installation\n\n#### Requirements\n\n- [Go](https://golang.org/dl/) 1.19+\n- [Graphviz](http://www.graphviz.org/download/) (optional, required only with `-graphviz` flag)\n\nTo install go-callvis, run:\n\n```sh\n# Latest release\ngo install github.com/ofabry/go-callvis@latest\n\n# Development version\ngo install github.com/ofabry/go-callvis@master\n```\n\nAlternatively, clone the repository and compile the source code:\n\n```sh\n# Clone repository\ngit clone https://github.com/ofabry/go-callvis.git\ncd go-callvis\n\n# Compile and install\nmake install\n```\n\n### Usage\n\n#### Interactive viewer\n\nTo use the interactive view provided by a web server that serves SVG images of focused packages, you can simply run:\n\n`go-callvis \u003ctarget package\u003e` \n\nHTTP server is listening on [http://localhost:7878/](http://localhost:7878/) by default, use option `-http=\"ADDR:PORT\"` to change HTTP server address.\n\n#### Render static output\n\nTo generate a single output file use option `-file=\u003cfile path\u003e` to choose output file destination.\n\nThe output format defaults to `svg`, use option `-format=\u003csvg|png|jpg|...\u003e` to pick a different output format.\n\n#### Options\n\n```\nUsage of go-callvis:\n  -debug\n    \tEnable verbose log.\n  -file string\n    \toutput filename - omit to use server mode\n  -cacheDir string\n    \tEnable caching to avoid unnecessary re-rendering.\n  -focus string\n    \tFocus specific package using name or import path. (default \"main\")\n  -format string\n    \toutput file format [svg | png | jpg | ...] (default \"svg\")\n  -graphviz\n    \tUse Graphviz's dot program to render images.\n  -group string\n    \tGrouping functions by packages and/or types [pkg, type] (separated by comma) (default \"pkg\")\n  -http string\n    \tHTTP service address. (default \":7878\")\n  -ignore string\n    \tIgnore package paths containing given prefixes (separated by comma)\n  -include string\n    \tInclude package paths with given prefixes (separated by comma)\n  -limit string\n    \tLimit package paths to given prefixes (separated by comma)\n  -minlen uint\n    \tMinimum edge length (for wider output). (default 2)\n  -nodesep float\n    \tMinimum space between two adjacent nodes in the same rank (for taller output). (default 0.35)\n  -nointer\n    \tOmit calls to unexported functions.\n  -nostd\n    \tOmit calls to/from packages in standard library.\n  -rankdir\n        Direction of graph layout [LR | RL | TB | BT] (default \"LR\")\n  -skipbrowser\n    \tSkip opening browser.\n  -tags build tags\n    \ta list of build tags to consider satisfied during the build. For more information about build tags, see the description of build constraints in the documentation for the go/build package\n  -tests\n    \tInclude test code.\n  -algo string\n        Use specific algorithm for package analyzer: static, cha, rta or vta (default \"static\")\n  -version\n    \tShow version and exit.\n```\n\nRun `go-callvis -h` to list all supported options.\n\n## Reference guide\n\nHere you can find descriptions for various types of output.\n\n### Packages / Types\n\n|Represents  | Style|\n|----------: | :-------------|\n|`focused`   | **blue** color|\n|`stdlib`    | **green** color|\n|`other`     | **yellow** color|\n\n### Functions / Methods\n\n|Represents   | Style|\n|-----------: | :--------------|\n|`exported`   | **bold** border|\n|`unexported` | **normal** border|\n|`anonymous`  | **dotted** border|\n\n### Calls\n\n|Represents   | Style|\n|-----------: | :-------------|\n|`internal`   | **black** color|\n|`external`   | **brown** color|\n|`static`     | **solid** line|\n|`dynamic`    | **dashed** line|\n|`regular`    | **simple** arrow|\n|`concurrent` | arrow with **circle**|\n|`deferred`   | arrow with **diamond**|\n\n## Examples\n\nHere is an example for the project [syncthing](https://github.com/syncthing/syncthing).\n\n[![syncthing example](images/syncthing.png)](https://raw.githubusercontent.com/ondrajz/go-callvis/master/images/syncthing.png)\n\n\u003e Check out [more examples](examples) and used command options.\n\n## Community\n\nJoin [#go-callvis](https://gophers.slack.com/archives/go-callvis) channel at [gophers.slack.com](http://gophers.slack.com). (*not a member yet?* [get invitation](https://gophersinvite.herokuapp.com))\n\n### How to help\n\nDid you find any bugs or have some suggestions?\n- Feel free to open [new issue](https://github.com/ondrajz/go-callvis/issues/new) or start discussion in the slack channel.\n\nDo you want to contribute to the project?\n- Fork the repository and open a pull request. [Here](https://github.com/ondrajz/go-callvis/projects/1) you can find TODO features.\n\n---\n\n#### Roadmap\n\n##### The *interactive tool* described below has been published as a *separate project* called [goexplorer](https://github.com/ondrajz/goexplorer)!\n\n\u003e Ideal goal of this project is to make web app that would locally store the call graph data and then provide quick access of the call graphs for any package of your dependency tree. At first it would show an interactive map of overall dependencies between packages and then by selecting particular package it would show the call graph and provide various options to alter the output dynamically.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fondrajz%2Fgo-callvis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fondrajz%2Fgo-callvis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fondrajz%2Fgo-callvis/lists"}