Peter Retief has released codemap, a Go tool that generates a single HTML page mapping an entire module's structure. The tool visualizes every package, its dependencies, and all functions within each file. Users can search the map, click packages to see what they use and what uses them, and jump to specific function lines for modules hosted on GitHub.
The example demonstrates yggstore's map with 40 packages and 1,850 functions. Installation requires Go 1.24 or later; users run `go run github.com/peterretief/codemap@latest -o code-map.html` in their module's folder. The generated HTML file contains no server requirements, making it portable for any website.
The mapping structure places foundations at the bottom and commands at the top, with wider boxes indicating more functions. Colors represent top-level folders, while internal/ packages, vendor directories, testdata folders, and modules with their own go.mod are excluded from the map. Fonts load from Google Fonts with system font fallback.
The tool integrates with GitHub Actions for automated map generation and artifact upload.
Source: Hacker News · Summarized by HeadlinesBriefing