gen_stats

command
v2.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Command gen_stats auto-generates the repository statistics section in README.md. It classifies every tracked Go file, counts dependencies, and replaces the content between the <!-- START STATS --> / <!-- END STATS --> markers.

Every figure is a pure function of the tracked file set. Nothing is derived from git history: a commit count changes with the very commit that would refresh it, so the section could never be both committed and current, and a CI shallow clone would compute a different number anyway. Files come from the git index rather than a directory walk for the same reason — see [listTrackedGoFiles]. That is what makes `--check` usable as a gate.

Usage:

go run ./cmd/gen_stats/

With --check it verifies the section is current without writing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL