Codemap is a Go-module visualization tool that generates a single HTML page showing the module’s packages, internal dependencies, files, and functions. Its map arranges packages so dependencies point downward: foundational packages sit near the bottom, while packages built on them appear above. Box width indicates the number of functions, and colors distinguish top-level folders. Users can search the map and select a package to inspect both the packages it depends on and those that depend on it. Function entries can link directly to their lines in a GitHub repository. Tests are excluded, as are vendor and testdata directories, nested folders with their own go.mod files, and the internal/ prefix in displayed names.
The tool is intended to make a codebase’s structure easier to explore at a glance, rather than requiring readers to trace imports and files manually. With Go 1.24 or later, it can be run from a module directory to produce code-map.html, or pointed at another directory with the -root option. Because the result is a standalone HTML file, it can be opened locally or hosted without setting up a server; its fonts load from Google Fonts when available and otherwise fall back to system fonts. Codemap can also run in GitHub Actions, where the generated map can be uploaded as a workflow artifact. The README illustrates the scale it can handle with a map of yggstore, containing 40 packages and 1,850 functions.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.