Documentation
¶
Overview ¶
Command doccheck builds the Go code in the documentation, so it cannot drift from the API it describes.
Each harness in internal/doccheck/harness is a Go program with markers of the form
// SNIPPETS <file.md> "<heading>"
on a line of their own. doccheck replaces each marker with the ```go blocks of that section of the file — from the heading to the next heading of the same or a higher level — in document order, writes each program to its own module built against this checkout, and vets it. Stubs in a harness stand in for what a document marks as the application's own. Every ```go block in GETTING_STARTED.md and docs/guides must be covered by a marker.
Run it from the repository root:
go run ./internal/doccheck
Click to show internal directories.
Click to hide internal directories.