The generated visualization structures codebases vertically, placing foundational packages at the bottom and sizing package boxes according to their function counts. Colors distinguish top-level folders, while directories like "vendor", "testdata", and nested modules are deliberately omitted to reduce visual noise. Users can host the lightweight HTML file on any static site because it operates without a dedicated backend server. The tool requires Go 1.24 or later and supports automation through a GitHub Action.
Key points
Standalone HTML output eliminates the requirement for a backend server when hosting maps.: Standalone HTML output eliminates the requirement for a backend server when hosting maps.
Hierarchical stacking ensures that every code layer depends strictly on elements located…: Hierarchical stacking ensures that every code layer depends strictly on elements located below it.
Direct links allow developers to jump straight to exact function lines in GitHub reposito…: Direct links allow developers to jump straight to exact function lines in GitHub repositories.
Sources checked by our analysis pipeline: 1
One HTML page that maps a Go module: every package, what it builds on within the module, and the functions in each of its files. Search it, click a package to see what it uses and what uses it, and, for a module on GitHub, jump to any function's line. Tests are left out.
Example: yggstore's map, 40 packages and 1,850 functions.
In your module's folder, with Go 1.24 or later:
go run github.com/peterretief/codemap@latest -o code-map.html
Then open code-map.html
in a browser. It's one file with nothing to serve,
so it can go on any website. -root DIR
maps another folder.
- uses: actions/checkout@v4
- uses: peterretief/codemap@v0.1.0
with:
output: code-map.html
- uses: actions/upload-artifact@v4
with:
name: code-map
path: code-map.html
- Each row builds only on the rows below it, so the foundations are at the bottom and your commands at the top.
- Wider boxes have more functions, and colours are top-level folders.
internal/
is left off names.vendor
,testdata
and folders with their owngo.mod
are left out.- The page loads its fonts from Google Fonts, and falls back to system fonts…
Continental leaders are directing fresh capital toward the domestic semiconductor sector to strengthen its position against rival international markets. The funding strategy is designed to build out foundational capacity in regional tech businesses. By targeting emerging firms, the initiative seeks to narrow the existing performance gap with dominant global players.
Data centers in Texas are confronting an uncertain future following the victory of Hinojosa in the state's gubernatorial race. The outcome of the election leaves the outlook for these facilities unclear.
Tokyo is preparing an emergency defense package to secure advance warnings on critical digital flaws before they are publicly exposed. Prompted by directives from Prime Minister Sanae Takaichi following widespread global disruptions, officials aim to safeguard critical infrastructure and public agencies from increasingly automated threats. This strategy relies heavily on establishing formalized intelligence pipelines with foreign technology leaders to drastically shorten domestic response times.